Skip to contents

Stops if data frame frm does not contain all columns of which the names are given in reqCols.

Usage

checkForMissingColumns(
  frm,
  reqCols,
  do.stop = TRUE,
  dataFrameName = deparse(substitute(frm))
)

Arguments

frm

data frame

reqCols

vector of names of which existence in frm shall be checked

do.stop

if TRUE, stop() is called else warning() if a column is missing

dataFrameName

the name of the data frame to be shown in the error message if a column was missing

Value

TRUE if all required columns are available, else FALSE