check_cols: Check Cols

Description Usage Arguments Details Value

Description

Checks the names and order of columns in data.

Usage

1
2
check_cols(data, colnames = NULL, exclusive = FALSE, ordered = FALSE,
  data_name = substitute(data))

Arguments

data

The data frame to check.

colnames

A character vector of the column names.

exclusive

A flag indicating whether data can include additional columns.

ordered

A flag indicating whether the order of the columns has to match.

data_name

A string of the name of data.

Details

By default (colnames = NULL) data must include at least one column. To check for no columns set colnames = character(0).

Value

Throws an informative error or returns an invisible copy of the data.



Search within the datacheckr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.