Learn R Programming

omopgenerics (version 1.1.1)

validateNameStyle: Validate nameStyle argument. If any of the element in ... has length greater than 1 it must be contained in nameStyle. Note that snake case notation is used.

Description

Validate nameStyle argument. If any of the element in ... has length greater than 1 it must be contained in nameStyle. Note that snake case notation is used.

Usage

validateNameStyle(nameStyle, ..., call = parent.frame())

Value

invisible nameStyle.

Arguments

nameStyle

A character vector. It must contain all the ... elements in snake_case format and between {}.

...

Elements to be included.

call

Passed to cli functions.

Examples

Run this code
validateNameStyle(
  nameStyle = "hi_{cohort_name}",
  cohortName = c("cohort1", "cohort2"),
  otherVariable = c("only 1 value")
)

if (FALSE) {
validateNameStyle(
  nameStyle = "hi_{cohort_name}",
  cohortName = c("cohort1", "cohort2"),
  otherVariable = c("value1", "value2")
)
}
validateNameStyle(
  nameStyle = "{other_variable}_hi_{cohort_name}",
  cohortName = c("cohort1", "cohort2"),
  otherVariable = c("value1", "value2")
)

Run the code above in your browser using DataLab