Create Subgroups
Arguments
- ref_vec
Vector of numeric values
- grp_defs
Vector of strings with groupings defined. Format must be either: <00, >=00, 00-00, or 00-<00
Examples
create_subgrps(c(1:10), c("<2", "2-5", ">5"))
#> [1] "<2" "2-5" "2-5" "2-5" "2-5" ">5" ">5" ">5" ">5" ">5"
create_subgrps(c(1:10), c("<=2", ">2-5", ">5"))
#> [1] "<=2" "<=2" ">2-5" ">2-5" ">2-5" ">5" ">5" ">5" ">5" ">5"
create_subgrps(c(1:10), c("<2", "2-<5", ">=5"))
#> [1] "<2" "2-<5" "2-<5" "2-<5" ">=5" ">=5" ">=5" ">=5" ">=5" ">=5"