validate_logical_vector {imt} | R Documentation |
Validate a Logical Subgroup Vector
Description
This function checks if a given vector is a logical vector (TRUE
/FALSE
)
and whether its length matches the number of rows in a specified matrix.
It is designed to validate subgroup vectors used for subsettin data.
Usage
validate_logical_vector(subgroup, N, name = NULL)
Arguments
subgroup |
A logical vector representing the subgroup to be validated. |
N |
Length the subgroup should have. |
name |
(Optional) A string indicating the name of group. |
Details
This function performs two key validations:
Checks if the
subgroup
vector is logical.Checks if the length of the
subgroup
vector matches the N.
Value
The original subgroup
vector if it passes all validation checks.
[Package imt version 1.0.0 Index]