Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (28 sloc) 0.901 kb
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{parse_formula}
\alias{parse_formula}
\title{Parse casting formulae.}
\usage{
parse_formula(formula = "... ~ variable", varnames, value.var = "value")
}
\arguments{
\item{formula}{formula to parse}
\item{varnames}{names of all variables in data}
\item{value.var}{name of variable containing values}
}
\description{
There are a two ways to specify a casting formula: either as a string, or
a list of quoted variables. This function converts the former to the
latter.
}
\details{
Casting formulas separate dimensions with \code{~} and variables within
a dimension with \code{+} or \code{*}. \code{.} can be used as a
placeholder, and \code{...} represents all other variables not otherwise
used.
}
\examples{
reshape2:::parse_formula("a + ...", letters[1:6])
reshape2:::parse_formula("a ~ b + d")
reshape2:::parse_formula("a + b ~ c ~ .")
}
Jump to Line
Something went wrong with that request. Please try again.