with,DataFrame-method {SparkR}R Documentation

Evaluate a R expression in an environment constructed from a DataFrame

Description

Evaluate a R expression in an environment constructed from a DataFrame with() allows access to columns of a DataFrame by simply referring to their name. It appends every column of a DataFrame into a new environment. Then, the given expression is evaluated in this new environment.

Usage

## S4 method for signature 'DataFrame'
with(data, expr, ...)

with(data, expr, ...)

Arguments

data

(DataFrame) DataFrame to use for constructing an environment.

expr

(expression) Expression to evaluate.

...

arguments to be passed to future methods.

See Also

attach

Examples

## Not run: 
##D with(irisDf, nrow(Sepal_Width))
## End(Not run)

[Package SparkR version 1.6.0 Index]