powered by
This function groups the data based on the specified variables and assigns an id to each group
ipfGroup(data, ...)
A numeric vector with the ids of the groups, in the same order as they appear in the data provided.
A data frame
Variables to group by. All variables (columns) will be used if no parameter is provided.
group <- ipfGroup(mtcars, cyl) group <- ipfGroup(mtcars, gear, carb) group <- ipfGroup(ipftrain, X, Y)
Run the code above in your browser using DataLab