check_data1: Check Data1

Description Usage Arguments Details Value

View source: R/check-data1.R

Description

Checks a data frame's rows, columns, classes and values and key.

Usage

1
2
check_data1(data, values = NULL, min_row = 0, max_row = max_nrow(),
  key = character(0), data_name = substitute(data))

Arguments

data

The data frame to check.

values

A named list specifying the columns and their associated classes and values.

min_row

A count of the minimum number of rows.

max_row

A count of the maximum number of rows.

key

A character vector of the column names representing the key.

data_name

A string of the name of data.

Details

check_data1 enforces minimal contraints. By default it does not require data to have any rows or columns. It also allows NULLs in values and does not require column names in values to be unique.

For stricter data checking see check_data2 and check_data3.

Value

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


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