df_from_expr: Construct from an expression a data frame holding what's...

Description Usage Arguments Details Examples

View source: R/df_from_expr.R

Description

Expressions, including model formulas, are often created to refer to variables in a particular data frame. This function figures out which variables are being referred to and makes a data frame containing just those variables.

Usage

1

Arguments

data

The data frame that E is with respect to.

E

An expression intended to be evaluated with respect to a data frame. The expression could be produced by quote(), but more often it will be produced by one of the lang-related functions in the rlang package or be extracted from one side or the other of a formula.

base

A flag saying whether the variable itself (default: TRUE``) or the transformation of the variable (FALSE') should appear in the data frame.

Details

When the expression involves a transformation of a variable, e.g. log(price), when base = TRUE the variable itself (e.g. price) will be in the data frame rather than the transformation.

Examples

1
2
3
4

dtkaplan/mdsint documentation built on May 28, 2019, 7:55 p.m.