Learn R Programming

taRifx (version 1.0.6.2)

bytable: Produces a nice summary table by groupings

Description

produces a nice summary table by groupings, suitable for use with latex.table.by().

Usage

bytable(datavec, indices, ops = c(quote(mean)),
    ops.desc = list(mean = "Mean"), na.rm = TRUE)

Arguments

datavec

Vector to be analyzed

indices

Indices should be a list of grouping vectors, just like you would pass to -by-, but with sensible names for each vector

ops

Vector of quote'd operations to perform

ops.desc

Vector of length length(ops) containing the column labels for the operations.

na.rm

Remove NAs or not

Value

data.frame

See Also

latex.table.by

Examples

Run this code
# NOT RUN {
bytable(runif(100),indices=list(rep(c('a','b'),50)))
# }

Run the code above in your browser using DataLab