Learn R Programming

dat (version 0.7.0)

FL: Dynamically generate formulas

Description

Function to dynamically generate formulas - (F)ormula (L)ist - to be used in mutar.

Usage

FL(..., .n = NULL, pattern = "\\.n")

makeFormulas(..., .n, pattern = "\\.n")

# S3 method for FormulaList update(object, data, ...)

Arguments

...

(formulas)

.n

names to be used in formulas. Can be any object which can be used by extract to select columns. NULL is interpreted to use the formulas without change.

pattern

(character) pattern to be replaced in formulas

object

(FormulaList)

data

(data.frame)

See Also

mutar

Examples

Run this code
FL(.n ~ mean(.n), .n = "variable")
as(makeFormulas(.n ~ mean(.n), .n = "variable"), "FormulaList")

Run the code above in your browser using DataLab