ds.names {dsBaseClient}R Documentation

Gets the names of items in a list

Description

This function is similar to the R function mean.

Usage

ds.names(x = NULL, datasources = NULL)

Arguments

x

a character, the name of an object of type list.

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

In DataSHIELD the use of this function is restricted to objects of type list.

Value

The names of the list's elements for each study

Author(s)

Gaye, A.

Examples

{

  # load the login data
  data(logindata)

  # login and assign some variables to R
  myvar <- list("DIS_DIAB","PM_BMI_CONTINUOUS","LAB_HDL", "GENDER")
  opals <- datashield.login(logins=logindata,assign=TRUE,variables=myvar)

  # generates subset tables from the table assigned above (by default the table name is 'D')
  ds.subsetByClass(x='D', subsets='subclasses')

  # the above object 'subsets' is a list, let us display the names of elements in 'subsets'
  ds.names('subclasses')

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

}

[Package dsBaseClient version 4.1.0 ]