powered by
Assign a group label to items in a vector
createGroups(items, nG)
A data frame containing the items and their group labels
A vector of items
The number of groups
x <- paste("item", 1:10, sep = "") df <- createGroups(x, 3) print(df)
Run the code above in your browser using DataLab