getGroupID | R Documentation |
Mostly intended for internal use.
getGroupID(group)
group |
A vector describing the grouping structure. It should contain a group id for each predictor variable. |
An object of class groupID, which is a list, whose members are vectors of indices corresponding to each group. The names of the list members are the corresponding group names.
group <- c("A", "A", 2, 9, "A", 9, 9, 2, "A")
group.id <- getGroupID(group)
group.id
# $A
# [1] 1 2 5 9
#
# $`2`
# [1] 3 8
#
# $`9`
# [1] 4 6 7
#
# attr(,"class")
# [1] "groupID"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.