View source: R/collectedfunctions.R
addvar | R Documentation |
This function allows you to add derived variable (ex: add mean value by ID).
addvar(dat, sort, var, fun, add.to.data = "yes", name = NULL)
dat |
data frame |
sort |
sort derived variable by ex:"ID","SEX" |
var |
variable to be derived |
fun |
deriving function ex:"mean x" |
add.to.data |
if "yes" result will be appended to dat |
name |
column name of derived variable |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.