reshape1 {reshape} | R Documentation |
Takes data frame and variable list and casts data.
reshape1(data, rows = NULL, cols = NULL, fun.aggregate, margins, ...)
data |
data frame |
rows |
variables to appear in columns |
cols |
variables to appear in rows |
fun.aggregate |
aggregation function |
margins |
vector of variable names (can include "grand_col" and "grand_row") to compute margins for, or TRUE to computer all margins |
... |
further arguments are passed to aggregating function |
Hadley Wickham <h.wickham@gmail.com>