| vc_compare | R Documentation |
Validates If Comparison Met
vc_compare(data, x, y, comparison, date = FALSE, ...)
data |
A data frame. |
x |
Column name from |
y |
Column name from |
comparison |
logical operator for the comparison |
date |
logical. If |
... |
ignored. |
dat <- data.frame(
a = c(NA, 1:10),
b = c(0, 1, 2:10+1),
d1 = c(NA, sprintf("2016-01-%sT09", 11:20)),
d2 = c("2016-01-01T09", "2016-01-11T09", sprintf("2016-05-%sT09", 12:20)),
stringsAsFactors = FALSE
)
vc_compare(dat, x = 'a', y = 'b', '<')
vc_compare(dat, x = 'a', y = 'b', '<=')
vc_compare(dat, x = 'd1', y = 'd2', '<', date=TRUE)
vc_compare(dat, x = 'd1', y = 'd2', '<=', date=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.