Description Usage Arguments Value Author(s) Examples
this function recodes levels of a categorical variable with new given labels.
1 | ji.recodelevels.ds(xvect, newlabels = NULL)
|
xvect |
a factor |
newlabels |
a string vector with new labels for the
levels If |
a factor vector with new labels for levels
Isaeva, J.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# load the login data
data(logindata)
# login and assign specific variable(s)
myvar <- list("PM_BMI_CATEGORICAL")
library(opal)
opals <- datashield.login(logins=logindata,assign=TRUE,variables=myvar)
# rename the levels of PM_BMI_CATEGORICAL
datashield.assign(opals, 'bmi_new', quote(ji.recodelevels.ds(D$PM_BMI_CATEGORICAL, newlabels=c('normal', 'overweight', 'obesity'))))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.