validate_domain_score {capl}R Documentation

Check whether a CAPL-2 domain score is valid.

Description

This function checks whether a CAPL-2 domain score is numeric and within a valid range.

Usage

validate_domain_score(x = NA, domain = NA)

Arguments

x

A vector representing a CAPL domain score.

domain

A character vector representing domains within CAPL (valid values are "pc", "db", "mc", "ku"; valid values are not case-sensitive).

Details

Other capl functions called by this function include: validate_number() and validate_integer().

Value

Returns a numeric vector (if valid) or NA (if not valid).

Examples

validate_domain_score(
  x = c(34, 15, 10, 12.5, 25),
  domain = "pc"
)

# [1]   NA 15.0 10.0 12.5 25.0


[Package capl version 1.39 Index]