RowGroups | R Documentation |
Create numbering according to unique rows
RowGroups(x, returnGroups = FALSE, returnGroupsId = FALSE)
x |
Data frame or matrix |
returnGroups |
When TRUE unique rows are returned |
returnGroupsId |
When TRUE Index of unique rows are returned |
A vector with the numbering or, according to the arguments, a list with more output.
Øyvind Langsrud
a <- data.frame(x = c("a", "b"), y = c("A", "B", "A"), z = rep(1:4, 3))
RowGroups(a)
RowGroups(a, TRUE)
RowGroups(a[, 1:2], TRUE, TRUE)
RowGroups(a[, 1, drop = FALSE], TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.