Learn R Programming

orchaRd (version 2.2.1)

.is_group_valid: Validate Group Argument

Description

Checks if a group variable meets the requirements for analysis: - It is not missing or NULL - It exists in the data frame - It is a categorical variable - It has no missing values

Usage

.is_group_valid(data, column_name)

Value

logical. TRUE if the group variable is valid, otherwise stops with an error message

Arguments

data

data.frame. A data frame containing the group variable

column_name

character. The name of the column to check

Author

Facundo Decunta - fdecunta@agro.uba.ar