1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/formula.r
\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 ~ .")
}
|