.checkRequiredColumnsDF is a tryCatch wrapper of the .checkRequiredColumns function. .checkRequiredColumnsDF checks if the required columns (see .requiredColumns) are present and in the right order in a single bugphyzz dataset. If a required column is missing or is not in the right order, it prints a message indicating which columns must be added or reordered.

.checkRequiredColumnsDF(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

Invisibly returns an error condition ("required_columns_missing" or "required_columns_misplaced" subclass). It also returns an error message if any of the required columns is missing or is not in the right order. If no errors are found, a message indicating that the required columns are present and in the right order is printed.

Examples


if (FALSE) {

x <- physiologies("aerophilicity")[[1]]
err <- bugphyzz:::.checkRequiredColumnsDF(x[[1]])

}