ji.ds.sum: Returns the sum of all the values present in its arguments

Description Usage Arguments Value Author(s) Examples

Description

Returns the sum of all the values present in its arguments

Usage

1
2
  ji.ds.sum(datasources = NULL, vector = NULL,
    newobj = 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.

vector

a vector that holds the objects to sum (numeric, complex og logical objects)

newobj

the name of the output object. If this argument is set to NULL, the name of the new object is 'sum_vect'.

Value

a message is displayed when the action is completed.

Author(s)

Gaye, A. (amadou.gaye

Examples

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

# load the file that contains the login details
data(logindata)

# login and assign the required variables to R
myvar <- list("LAB_TSC","LAB_HDL")
opals <- datashield.login(logins=logindata,assign=TRUE,variables=myvar)

# compute the sum of 'LAB_TSC' and 'LAB_HDL' (removing missing values if exist)
myvect <- quote(sum(D$LAB_TSC, D$LAB_HDL, na.rm=T))
ji.ds.sum(datasources=opals, vector=myvect)
}

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