Learn R Programming

omopgenerics (version 1.4.1)

validateAgeGroupArgument: Validate the ageGroup argument. It must be a list of two integerish numbers lower age and upper age, both of the must be greater or equal to 0 and lower age must be lower or equal to the upper age. If not named automatic names will be given in the output list.

Description

Validate the ageGroup argument. It must be a list of two integerish numbers lower age and upper age, both of the must be greater or equal to 0 and lower age must be lower or equal to the upper age. If not named automatic names will be given in the output list.

Usage

validateAgeGroupArgument(
  ageGroup,
  multipleAgeGroup = TRUE,
  overlap = FALSE,
  null = TRUE,
  empty = TRUE,
  ageGroupName = "age_group",
  nm = deparse1(substitute(ageGroup), backtick = TRUE),
  call = parent.frame()
)

Value

validate ageGroup

Arguments

ageGroup

age group in a list.

multipleAgeGroup

Allow multiple age groups.

overlap

allow overlapping ageGroup.

null

null age group allowed true or false.

empty

Whether it can be empty.

ageGroupName

Name of the default age group.

nm

Name to use in error messages. Defaults to the expression supplied to ageGroup.

call

Call argument passed to cli functions.

Examples

Run this code
validateAgeGroupArgument(list(c(0, 39), c(40, Inf)))

Run the code above in your browser using DataLab