Revision d7d53c77075d270c27cd685a1eaa3de7a061ec8b authored by Mark van der Loo on 28 March 2023, 12:10:02 UTC, committed by cran-robot on 28 March 2023, 12:10:02 UTC
1 parent b2faaaa
Raw File
check_that.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/confrontation.R
\name{check_that}
\alias{check_that}
\title{Simple data validation interface}
\usage{
check_that(dat, ...)
}
\arguments{
\item{dat}{an R object carrying data}

\item{...}{a comma-separated set of validating expressions.}
}
\value{
An object of class \code{\link{validation}}
}
\description{
Simple data validation interface
}
\section{Details}{

Creates an object of class \code{\link{validator}} and \code{\link{confront}}s it with the data.
This function is easy to use in combination with the \pkg{magrittr} pipe operator.
}

\examples{

cf <- check_that(women, height>0, height/weight < 0.5)
cf
summary(cf)
barplot(cf)


\dontrun{
# this works only after loading the 'magrittr' package
women \%>\% 
  check_that(height>0, height/weight < 0.5) \%>\%
  summary()
}

}
\seealso{
Other validation-methods: 
\code{\link{aggregate,validation-method}},
\code{\link{all,validation-method}},
\code{\link{any,validation-method}},
\code{\link{barplot,validation-method}},
\code{\link{compare}()},
\code{\link{confront}()},
\code{\link{event}()},
\code{\link{names<-,rule,character-method}},
\code{\link{plot,validation-method}},
\code{\link{sort,validation-method}},
\code{\link{summary}()},
\code{\link{validation-class}},
\code{\link{values}()}
}
\concept{validation-methods}
back to top