Learn R Programming

omopgenerics (version 1.1.1)

validateNewColumn: Validate a new column of a table

Description

Validate a new column of a table

Usage

validateNewColumn(table, column, validation = "warning", call = parent.frame())

Value

table without conflicting columns.

Arguments

table

The table to check if the column already exists.

column

Character vector with the name(s) of the new column(s).

validation

Whether to throw warning or error.

call

Passed to cli functions.

Examples

Run this code
x <- dplyr::tibble(
  column1 = c(1L, 2L),
  column2 = c("a", "b")
)
validateNewColumn(x, "not_exiting_column")
validateNewColumn(x, "column1")

Run the code above in your browser using DataLab