# NOT RUN {
# Sub-criteria
s_cri1 <- sub_criteria(c(30, 28, 40, 25, 25, 29, 27),
match_funcs = range_match)
s_cri2 <- sub_criteria(c(30, 28, 40, 25, 25, 29, 27),
match_funcs = exact_match)
# Nested sub-criteria
s_cri3 <- sub_criteria(s_cri1, s_cri2, operator = "or")
s_cri4 <- sub_criteria(s_cri1, s_cri3, operator = "and")
# Objects of the same length
attrs(month.abb, month.name)
# Or a data.frame or list with elements of the same length
attrs(.obj = mtcars)
# Or a combinaiton of the both
attrs(mtcars$mpg, mtcars$cyl, .obj = mtcars)
# Each can then be passed to a `sub-criteria`
sub_criteria(
month.abb,
month.name,
attrs(month.abb, month.name)
)
# }
Run the code above in your browser using DataLab