dtransform | R Documentation |
Defines new variables under condition for data frame
dtransform(data, ...)
data |
is data frame |
... |
new variable definitions including possible if condition |
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.