View source: R/data_management.R
compare_columns | R Documentation |
Compare columns progressively in a dataset using a specified operator, that tells how columns should be ordered (eg by default columns should be increasing)
compare_columns(
db = NULL,
operator = "<",
row_id = seq_len(nrow(db)),
extended = TRUE
)
db |
a data.frame with ordered columns |
operator |
comparison operator |
row_id |
an optional row id |
extended |
logical if TRUE |
a list of checks with values or (if extended = FALSE) a compact data.frame with non-passed checks and variable mentioning
(data <- data.frame(id = letters[1:4], x = c(1,2,3,4), y = c(0,1,3,NA), z = rep(0, 4)))
compare_columns(data[, -1], operator= '<')
compare_columns(data[, -1], operator= '>')
compare_columns(data[, -1], operator= '<', row_id = data$id)
compare_columns(data[, -1], operator= '<', row_id = data$id, extended = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.