validate_logical_vector | R Documentation |
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.
validate_logical_vector(subgroup, N, name = NULL)
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. |
This function performs two key validations:
Checks if the subgroup
vector is logical.
Checks if the length of the subgroup
vector matches the N.
The original subgroup
vector if it passes all validation checks.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.