Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

transform2

Like transform but allows right hand sides to refer to left hand sides.


Description

In transform the right hand sides of the arguments may not refer to the left hand sides. transform2 works like transform with the exception that a right hand side may refer to any of the variables on the left hand side of another argument. The argument defining the left hand side may come before or after the reference.

Usage

transform2(`_data`, ...)

Arguments

_data

A data frame.

...

Further arguments of the form tag=value.

Value

The modified value of _data.

See Also

Examples

## Not run: 
# bad
transform(BOD, b = a, a = demand)

## End(Not run)
# OK.  a is set to demand and b is set to a so both wind up equal to demand
transform2(BOD, b = a, a = demand)

gsubfn

Utilities for Strings and Function Arguments

v0.7
GPL (>= 2)
Authors
G. Grothendieck
Initial release
2018-03-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.