check_cols: Check Cols

Description Usage Arguments Details Value

View source: R/check-cols.R

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.


datacheckr documentation built on May 30, 2017, 6:05 a.m.

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