ag.ds.createfactor: create and combines factor vectors.

Description Usage Arguments Value Author(s) Examples

Description

This function calls a server function that generates factor vectors. If the generated factor is not valid (i.e. if any of the categories has a count > 0 and < 5) its values are replaced by missing values.

Usage

1
2
  ag.ds.createfactor(opals = NULL, xvect = NULL,
    newvarname = NULL)

Arguments

opals

a list of opal object(s) obtained after login in to opal servers; these objects hold also the data assign to R, as dataframe, from opal datasources.

xvect

a numeric of character vector.

newvarname

name of the variable to assigned the created factor to.

Value

a list of factor vectors or one factor vector.

Author(s)

Gaye, A.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{

# load the login data
data(logindata)

# login and assign specific variable(s)
myvar <- list("GENDER")
opals <- ag.ds.login(logins=logindata,assign=TRUE,variables=myvar)

# create a factor vector of the variable 'GENDER', one for each study
ag.ds.createfactor(opals=opals, "sex", xvect=quote(D$GENDER))
}

datashield/ag.dev.cl documentation built on May 14, 2019, 7:46 p.m.