R/vars_funs.R
vars_check_class.Rd
Check property characteristics against class definitions as defined # nolint here. # nolint
vars_check_class(age, sqft, class)
Integer or numeric vector of ages of properties. Either 1 long
or the same length as sqft
and class
.
Integer or numeric vector of the square footage of properties.
Either 1 long or the same length as age
and class
.
String or character vector of class codes. Either 1 long or
the same length as sqft
and age
.
A logical vector indicating that the specified class falls within
the parameters specified by class_dict
. Throws error if input
data types are incorrect or if length conditions of input vectors
are not met.
Other vars_funs:
vars_recode()
,
vars_rename()
vars_check_class(50, 800, "202")
#> [1] TRUE
vars_check_class(c(50, 80), c(800, 1000), c("202", "203"))
#> [1] TRUE TRUE
vars_check_class(c(50, 80), 1000, "210")
#> [1] FALSE TRUE
vars_check_class(50, c(800, 2000), "202")
#> [1] TRUE FALSE
vars_check_class(50, 1000, c("202", "203"))
#> [1] FALSE TRUE