1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper-margins.r
\name{add_margins}
\alias{add_margins}
\title{Add margins to a data frame.}
\usage{
add_margins(df, vars, margins = TRUE)
}
\arguments{
\item{df}{input data frame}
\item{vars}{a list of character vectors giving the variables in each
dimension}
\item{margins}{a character vector of variable names to compute margins for.
\code{TRUE} will compute all possible margins.}
}
\description{
Rownames are silently stripped. All margining variables will be converted
to factors.
}
|