Description Usage Arguments Value Author(s) Examples
This function is similar to R function as.factor
.
1 2 | ji.ds.asFactor(datasources = NULL, xvect = NULL,
newobj = NULL)
|
datasources |
a list of opal object(s) obtained
after login in to opal servers; these objects hold also
the data assign to R, as |
xvect |
a vector. |
newobj |
the name of the new vector.If this argument is set to NULL, the name of the new variable is the name of the input variable with the suffixe '_factor' (e.g. 'GENDER_factor', if input variable's name is 'GENDER') |
a message is displayed when the action is completed.
Gaye, A. (amadou.gaye
1 2 3 4 5 6 7 8 9 10 11 12 | {
# load that contains the login details
data(logindata)
# login and assign specific variable(s)
myvar <- list("GENDER") # ?????????????????????????????????????????????????????????????????????????????? another variable??????????????????
opals <- datashield.login(logins=logindata,assign=TRUE,variables=myvar)
# turn the factor variable 'GENDER' into a character vector
ji.ds.asFactor(datasources=opals, xvect=quote(D$GENDER), newobj="gender_as_factor")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.