ipft (version 0.2.2)

ipfGroup: Creates groups based on the specified parameters

Description

This function groups the data based on the specified variables and assigns an id to each group

Usage

ipfGroup(data, ...)

Arguments

data
A data frame
...
Variables to group by. All variables (columns) will be used if no parameter is provided.

Value

A numeric vector with the ids of the groups, in the same order as they appear in the data provided.

Examples

Run this code

    group <- ipfGroup(mtcars, cyl)

    group <- ipfGroup(mtcars, gear, carb)

    group <- ipfGroup(ipftrain, LONGITUDE, LATITUDE)

Run the code above in your browser using DataLab