ji.ds.NROW: Returns the number of rows present in x

Description Usage Arguments Value Author(s) Examples

Description

this function is similar to R function NROW with the addition that it also generates a global number of rows (i.e.total number of entries across several datasets)

Usage

1
2
  ji.ds.NROW(datasources = NULL, x = 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.

x

a vector, array, matrix or data frame

type

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

Value

an interger of length 1 or NULL

Author(s)

Gaye, A. (amadou.gaye

Examples

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

# load that contains the login details
data(logindata)

# login and assign specific variable(s)
opals <- datashield.login(logins=logindata,assign=TRUE)

# Example 1: Get the total number of observations across all the studies
ji.ds.NROW(datasources=opals, x=quote(D))

# Example 2: Get the number of observations on each study
ji.ds.NROW(datasources=opals, x=quote(D), type="split")

# Example 3: Get the total number of observations for the variable 'LAB_TSC' (should be the same as in Example 1)
ji.ds.NROW(datasources=opals, x=quote(D$LAB_TSC))

}

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