add_margins: Add margins to a data frame.

Description Usage Arguments

View source: R/helper-margins.r

Description

Rownames are silently stripped. All margining variables will be converted to factors.

Usage

1

Arguments

df

input data frame

vars

a list of character vectors giving the variables in each dimension

margins

a character vector of variable names to compute margins for. TRUE will compute all possible margins.


hadley/reshape documentation built on March 16, 2021, 9:38 a.m.