% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chk-sorted.R
\name{chk_sorted}
\alias{chk_sorted}
\alias{vld_sorted}
\title{Check Sorted}
\usage{
chk_sorted(x, x_name = NULL)

vld_sorted(x)
}
\arguments{
\item{x}{The object to check.}

\item{x_name}{A string of the name of object x or NULL.}
}
\value{
The \code{chk_} function throws an informative error if the test fails or
returns the original object if successful so it can used in pipes.

The \code{vld_} function returns a flag indicating whether the test was met.
}
\description{
Checks if is sorted using

\code{is.unsorted(x, na.rm = TRUE)}
}
\section{Functions}{
\itemize{
\item \code{vld_sorted()}: Validate Sorted

}}
\examples{
# chk_sorted
chk_sorted(1:2)
try(chk_sorted(2:1))
# vld_sorted
vld_sorted(1:2)
vld_sorted(2:1)
}
\seealso{
\code{\link[=is.unsorted]{is.unsorted()}}

For more details about the use of this function,
please read the article
\code{vignette("chk-families")}.
}
\concept{sorted_checkers}
