ddplyWithTotals: Extends ddply to calculate totals and subtotals.

Description Usage Arguments Examples

Description

This function takes a data frame, subsets it according to the levels of one or more variables, and returns a data frame containing the results computed on each subset, in addition to results computed on aggregate groups. See ddply for more details. See also DTplyWithTotals.

Usage

1
2
ddplyWithTotals(.data, .variables, .fun = NULL, nestedOnly = FALSE,
  grandTotal = FALSE)

Arguments

.data

Data frame to subset.

.variables

Vector of character strings or formula denoting variables to split on.

.fun

A function that returns a data frame, to be computed on each subset.

nestedOnly

Logical. Compute subtotals only for nested groups.

grandTotal

Logical. Compute the grand total.

Examples

1

sachsmc/rreporttools documentation built on May 29, 2019, 12:55 p.m.