File: add_margins.Rd

package info (click to toggle)
r-cran-reshape2 1.4.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 292 kB
  • sloc: cpp: 246; sh: 9; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 569 bytes parent folder | download | duplicates (2)
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.
}