validateNameArgument: Validate name argument. It must be a snake_case character...

View source: R/validate.R

validateNameArgumentR Documentation

Validate name argument. It must be a snake_case character vector. You can add the a cdm object to check name is not already used in that cdm.

Description

Validate name argument. It must be a snake_case character vector. You can add the a cdm object to check name is not already used in that cdm.

Usage

validateNameArgument(
  name,
  cdm = NULL,
  validation = "error",
  null = FALSE,
  call = parent.frame()
)

Arguments

name

Name of a new table to be added to a cdm object.

cdm

A cdm_reference object. It will check if a table named name already exists in the cdm.

validation

How to perform validation: "error", "warning".

null

If TRUE, name can be NULL

call

A call argument to pass to cli functions.

Examples

# this is a validate name
name <- "my_new_table"
validateNameArgument(name)

# this is not
name <- "myTableNAME"
validateNameArgument(name, validation = "warning")


omopgenerics documentation built on April 3, 2025, 8:47 p.m.