ds.colnames {dsBaseClient}R Documentation

Retrieves column names of a matrix-like object

Description

this function is similar to R function colnames.

Usage

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

Arguments

x

a character, the name of a dataframe or matrix.

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

The input is restricted to object of type 'data.frame' and 'matrix'

Value

a character vector

Author(s)

Gaye, A.; Isaeva, J.

See Also

ds.dim to obtain the dimensions of matrix or a data frame.

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)

  # Get the column names of the assigned datasets (default name is 'D')
  ds.colnames(x='D')

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

}

[Package dsBaseClient version 4.1.0 ]