.checkRequiredColumns checks if the required columns (see .requiredColumns) are present and in the right order in a single bugphyzz dataset.

.checkRequiredColumns(dat, dat_name = NULL)

Arguments

dat

A data frame from bugphyzz.

dat_name

A character string indicating the name of the dataset. Default is NULL.

Value

An error condition of subclass "required_columns_missing" or "required_columns_misplaced". NULL and a message if no errors are found.

Examples


if (FALSE) {

x <- physiologies("aerophilicity")[[1]]
err <- tryCatch(bugphyzz:::.checkRequiredColumns(x), error = function(e) e)
err

}