Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

margins

Figure out margining variables.


Description

Given the variables that form the rows and columns, and a set of desired margins, works out which ones are possible. Variables that can't be margined over are dropped silently.

Usage

margins(vars, margins = NULL)

Arguments

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.

Value

list of margining combinations, or NULL if none. These are the combinations of variables that should have their values set to (all)


reshape2

Flexibly Reshape Data: A Reboot of the Reshape Package

v1.4.4
MIT + file LICENSE
Authors
Hadley Wickham <h.wickham@gmail.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.