Description Usage Arguments Value Examples
Checks that all elements from the specified columns are positive
1 | sc_cols_positive(object, cols, zero_feasible = TRUE, ...)
|
object |
table with a columns specified by |
cols |
vector of characters of columns that are checked against the specified range |
zero_feasible |
if zero is in the range or not |
... |
further parameters that are passed to add_sanity_check. |
list of logical vectors where TRUE indicates where the check failed. Every list entry represents one of the columns specified in cols. This might be helpful if one wants to apply a counter-measure.
1 2 3 4 5 6 7 | d <- data.frame(a = c(0, 0.2, 3, Inf), b = c(1:4))
dummy_call <- function(x) {
sc_cols_positive(d, cols = c("a", "b"), zero_feasible = FALSE,
description = "Measurements are expected to be positive")
}
dummy_call(x = d)
get_sanity_checks()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.