# NOT RUN {
insist(iris, within_n_sds(3), Sepal.Length) # returns iris
library(magrittr)
iris %>%
insist(within_n_sds(4), Sepal.Length:Petal.Width)
# anything here will run
# }
# NOT RUN {
iris %>%
insist(within_n_sds(3), Sepal.Length:Petal.Width)
# datum at index 16 of 'Sepal.Width' vector is (4.4)
# is outside 3 standard deviations from the mean of Sepal.Width.
# The check fails, raises a fatal error, and the pipeline
# is terminated so nothing after this statement will run
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab