ds.class {dsBaseClient}R Documentation

Retrieves the class of an object

Description

This function is similar to R function class.

Usage

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

Arguments

x

an R object

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

Same as for the R function class.

Value

a character the type of x

Author(s)

Gaye, A.; Isaeva, J.

See Also

ds.exists to verify if an object is defined (exists) on the server side.

Examples

{

  # load that contains the login details
  data(logindata)

  # login and assign all the stored variables
  # (by default the assigned dataset is a dataframe named 'D')
  opals <- datashield.login(logins=logindata,assign=TRUE)

  # Example 1: Get the class of the whole dataset
  ds.class(x='D')

  # Example 2: Get the class of the variable PM_BMI_CONTINUOUS
  ds.class(x='D$LAB_TSC')

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

}

[Package dsBaseClient version 4.1.0 ]