ji.ds.range: Gets the range of a vector

Description Usage Arguments Value Author(s) Examples

Description

this function is similar to R function range but instead to not return the real minimum and maximum, the computed values are multiplied by a very small random number. In addition it also generates a global range (i.e. the range of a vector across several datasets)

Usage

1
2
  ji.ds.range(datasources = NULL, xvect = NULL,
    type = "combine")

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

a vector

type

a character which represents the type of analysis to carry out. If type is set to 'combine', a global range is calculated if type is set to 'split', the range is calculated separately for each study.

Value

a numeric vector which contains the minimum and the maximum

Author(s)

Gaye, A. (amadou.gaye

Examples

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

# load that contains the login details
data(logindata)

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

# Example 1: Get the global range of the variable 'LAB_TSC' - default behaviour
ji.ds.range(datasources=opals, xvect=quote(D$LAB_TSC))

# Example 2: Get the range of the variable 'LAB_TSC' for each study
ji.ds.range(datasources=opals, xvect=quote(D$LAB_TSC), type="split")
}

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