Description Usage Arguments Value Author(s) Examples
Augments the aggregate function with the ability to handle functions that require mulitple arguments. Each column specified in the response is a different argument for FUN.
1 2 3 | aggregate.m(formula, data, FUN)
aggregate.m(data,args,by,FUN)
|
formula |
The formula overwhich to aggregate. The response variable is given multiple columns by using cbind. e.g. cbind(x,y) ~ group |
data |
The data to aggregate over. |
args |
The columns which are to be the input arguments to the aggregating funciton, in order. |
by |
The actual columns which data will be aggregated by, as per aggregate. |
FUN |
The function by which to aggregate. There should be the same number of arguments to this function as there are columns in the dependent variable of the formula or the column names in 'args'. |
An aggregate data frame, for each unique set of 'by' columns (or the dependent variables of the fromula version is used) the result of apply the function to all rows with those column values is given.
David Little
1 2 3 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.