dtransform {mets} | R Documentation |
Transform that allows condition
Description
Defines new variables under condition for data frame
Usage
dtransform(data, ...)
Arguments
data |
is data frame |
... |
new variable definitions including possible if condition |
Examples
data(mena)
xx <- dtransform(mena,ll=log(agemena)+twinnum)
xx <- dtransform(mena,ll=log(agemena)+twinnum,agemena<15)
xx <- dtransform(xx ,ll=100+agemena,ll2=1000,agemena>15)
dsummary(xx,ll+ll2~I(agemena>15))
[Package mets version 1.3.4 Index]