ds.ls {dsBaseClient}R Documentation

Returns a vector of character strings giving the names of the objects on remote server


this function is similar to R function ls


ds.ls(datasources = NULL)



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.


When running analyses one may want to know the objects already generated. This function is not disclosive as it only returns the names of the objects and not their contents. As a restriction only objects in the current environment can be displayed and hidden objects names (names starting with '.') cannot be returned to avoid displaying anything else than the objects generated by the user in the current environment. Unlike the R base version of this function, the DataSHIELD version does not allow to specify another environment, only names of objects on the 'current' environment can be displayed.


a vector of character strings giving the names of the objects in the 'current' environment of the remote opal server.


Gaye, A.



  # load the file that contains the login details

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

  # assign 'LAB_TSC' in the dataframe D to a new variable 'labtsc'
  ds.assign(toAssign='D$LAB_TSC', newobj='labtsc')

  # now call the ds.ls function to display the names of the objects on the server site

  # clear the Datashield R sessions and logout


[Package dsBaseClient version 4.1.0 ]