stamp | R Documentation |
Stamp is like reshape but the "stamping" function is passed the entire data frame, instead of just a few variables.
stamp(data, formula = . ~ ., fun.aggregate, ..., margins=NULL, subset=TRUE, add.missing=FALSE)
data |
data.frame (no molten) |
formula |
formula that describes arrangement of result, columns ~ rows, see |
fun.aggregate |
aggregation function to use, should take a data frame as the first argument |
... |
arguments passed to the aggregation function |
margins |
margins to compute (character vector, or |
subset |
logical vector by which to subset the data frame, evaluated in the context of the data frame so you can |
add.missing |
fill in missing combinations? |
It is very similar to the by
function except in the form
of the output which is arranged using the formula as in reshape
Note that it's very easy to create objects that R can't print with this function. You will probably want to save the results to a variable and then use extract the results. See the examples.
Hadley Wickham <h.wickham@gmail.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.