Aggregate function (not to be confounded with
aggregate) prepares a data frame for merging by computing the sum, mean and variance of all continuous (integer and numeric) variables by a given ID variable.
It also creates dummies for all categorical variables (character and factor) and subsequently computes the sum by a given ID variable. This functions aims at maximal information extraction with a minimal amount of code.
A data frame without the ID. Categorical variables have to be of type character or factor and continuous variables have to be of type integer or numeric.
A vector containing ID”s.
A data frame with the aforementioned variables aggregated by the given ID variables.
Dirk Van den Poel, Michel Ballings, Andrey Volkov, Jeroen D”haen, Michiel Van Herwegen
Maintainer: Michel Ballings <[email protected]>
Van den Poel, D., Ballings, M., Volkov, A., D”haen, J., Van Herwegen, M., Predictive Analytics for analytical Customer Relationship Management using SAS, Oracle and R, Springer, Forthcoming.
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.