powered by
produces a nice summary table by groupings, suitable for use with latex.table.by().
bytable(datavec, indices, ops = c(quote(mean)), ops.desc = list(mean = "Mean"), na.rm = TRUE)
Vector to be analyzed
Indices should be a list of grouping vectors, just like you would pass to -by-, but with sensible names for each vector
Vector of quote'd operations to perform
Vector of length length(ops) containing the column labels for the operations.
Remove NAs or not
data.frame
latex.table.by
# NOT RUN { bytable(runif(100),indices=list(rep(c('a','b'),50))) # }
Run the code above in your browser using DataLab