powered by
This function checks whether a CAPL-2 domain score is numeric and within a valid range.
validate_domain_score(x = NA, domain = NA)
A vector representing a CAPL domain score.
A character vector representing domains within CAPL (valid values are "pc", "db", "mc", "ku"; valid values are not case-sensitive).
Returns a numeric vector (if valid) or NA (if not valid).
Other capl functions called by this function include: validate_number() and validate_integer().
capl
validate_number()
validate_integer()
# NOT RUN { validate_domain_score( x = c(34, 15, 10, 12.5, 25), domain = "pc" ) # [1] NA 15.0 10.0 12.5 25.0 # }
Run the code above in your browser using DataLab