check_colnames: Check whether 'test_names' are columns in the 'data.frame' df

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Check whether test_names are columns in the data.frame df

Usage

1
check_colnames(test_names, df, throw_error = TRUE)

Arguments

test_names

a vector of column names to test

df

the data.frame to test against

throw_error

boolean indicating whether to throw an error if any test_names are not found in df

Value

boolean indicating whether or not all test_names are columns of df

Examples

1
2
3
check_colnames(c("pert_id", "pert_iname"), cdesc_char) # TRUE
check_colnames(c("pert_id", "foobar"),
  cdesc_char, throw_error=FALSE)# FALSE, suppress error

cmap/cmapR documentation built on Oct. 14, 2021, 12:51 a.m.