ji.ds.levels: Provides access to the levels attribute of a variable

Description Usage Arguments Value Author(s) Examples

Description

this function is similar to R function levels

Usage

1
  ji.ds.levels(datasources = NULL, xvect = NULL)

Arguments

datasources

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

an R object (factor)

Value

levels of xvect

Author(s)

Gaye, A. (amadou.gaye

Examples

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

# load that contains the login details
data(logindata)

# login
opals <- datashield.login(logins=logindata,assign=TRUE)

# Example 1: Get the levels of the PM_BMI_CATEGORICAL variable
ji.ds.levels(datasources=opals, xvect=quote(D$PM_BMI_CATEGORICAL))

# Example 2: Get the levels of the LAB_TSC   SHOULD NOT WORK AS IT IS A CONTINUOUS VARIABLE
ji.ds.levels(datasources=opals, xvect=quote(D$LAB_TSC))
}

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