ds.list {dsBaseClient}R Documentation

Function to construct a list object

Description

This is similar to the R function list.

Usage

ds.list(x = NULL, newobj = NULL, datasources = NULL)

Arguments

x

a character, the names of the objects to coerce into a list.

newobj

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

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.

Details

If the objects to coerce into a list are for example vectors held in a matrix or a dataframe the names of the elements in the list are the names of columns.

Value

nothing is returned to the client, the new object is stored on the server side.

Author(s)

Gaye, A.; Isaeva, J.

Examples

{

 # 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)

 # combine the 'LAB_TSC' and 'LAB_HDL' variables into a list
 myobjects <- c('D$LAB_TSC', 'D$LAB_HDL')
 ds.list(x=myobjects)

 # clear the Datashield R sessions and logout
 datashield.logout(opals)

}

[Package dsBaseClient version 4.1.0 ]