check_values: Check a data frame against a white list for required names.

Description Usage Arguments Value Examples

View source: R/check.R

Description

Colorized output printed to the console with results

Usage

1
check_values(data, white_list, return_bad = FALSE)

Arguments

data

A dataframe or list.

white_list

A list, where the names are required columns and the elements are permitted values for each column.

return_bad

Boolean, should non-permitted values be returned in a list?

Value

The function invisibly returns a boolean value, TRUE if all needed names are present and FALSE if any needed names are missing. Unless return_bad=TRUE then it returns a list instead.

Examples

1
2
3
4
## Not run: 
hem_data %>% check_values(hem_wl)

## End(Not run)

hemoshear/assayr2 documentation built on Nov. 8, 2019, 6:13 p.m.