Learn R Programming

⚠️There's a newer version (1.4.1) of this package.Take me there.

DataSHIELD Lite

Serverless DataSHIELD Interface (DSI) implementation which purpose is to mimic the behavior of a distant (virtualized or barebone) data repository server (see DSOpal for instance). The datasets that are being analyzed are fully accessible in the local environment. The DataSHIELD configuration (set of allowed aggregation and assignment functions) is discovered at runtime by inspecting the DataSHIELD server-side R packages installed locally. This configuration can also be amended or provided explicitly.

The DSLite "server" (see DSLiteServer) is a R6 class. An instance of this class will host the datasets to be analyzed and the DataSHIELD configuration and will perform the DataSHIELD operations in the context of a session (a contained R environment).

DSLite can be used to:

  • speed up development and testing cycle when developping new DataSHIELD functions (both at server and client side): no

need to deploy a data repository infrastructure.

  • allow DataSHIELD analysis with combined datasets, some of them being accessible remotely in secure data repositories,

others being privatly accessible (in a governmental institution for instance).

The following figure illustrates a setup where a single DSLiteServer holds several data frames and is used by two different DataSHIELD Connection (DSConnection) objects. All these objects live in the same R environment (usually the Global Environment). The "server" is responsible for managing DataSHIELD sessions that are implemented as distinct R environments inside of which R symbols are assigned and R functions are evaluated. Using the R environment paradigm ensures that the different DataSHIELD execution context (client and servers) are contained and exclusive from each other.

The minimum steps to follow for this kind of setup:

  • make sure that both DataSHIELD client-side and server-side R packages are installed in your local R session,
  • load harmonized datasets in data frames (with the method of your choice),
  • instanciate a new DSLiteServer and provide a named list of these data frames,
  • prepare DataSHIELD logindata object where the table to assign is the name of one the data frames and the url is the symbol that refers to the DSLiteServer object,
  • perform DataSHIELD login and do analysis.

See usage examples.

Article about DataSHIELD:

Copy Link

Version

Install

install.packages('DSLite')

Monthly Downloads

496

Version

1.2.0

License

LGPL (>= 2.1)

Maintainer

Yannick Marcon

Last Published

March 16th, 2021

Functions in DSLite (1.2.0)

DASIM3

Simulated dataset DASIM 3
CNSIM2

Simulated dataset CNSIM 2
DSLite

Create a DSLite driver
DASIM2

Simulated dataset DASIM 2
DISCORDANT_STUDY1

Simulated dataset DISCORDANT 1
CNSIM3

Simulated dataset CNSIM 3
DASIM1

Simulated dataset DASIM 1
DISCORDANT_STUDY3

Simulated dataset DISCORDANT 3
CNSIM1

Simulated dataset CNSIM 1
DISCORDANT_STUDY2

Simulated dataset DISCORDANT 2
SURVIVAL.EXPAND_WITH_MISSING3

Simulated survival expand-with-missing dataset 3
DSLiteServer

Lightweight DataSHIELD server-side component
DSLiteResult-class

Class DSLiteResult.
TESTING.DATASET2

Simulated dataset TESTING.DATASET 2
defaultDSConfiguration

Default DataSHIELD configuration
dsIsAsync,DSLiteConnection-method

DSLite asynchronous support
dsListMethods,DSLiteConnection-method

List methods
.strToList

Parse a key pairs string to a list
TESTING.DATASET3

Simulated dataset TESTING.DATASET 3
dsAssignTable,DSLiteConnection-method

Assign a table
dsAssignResource,DSLiteConnection-method

Assign a resource
dsFetch,DSLiteResult-method

Fetch the result
SURVIVAL.EXPAND_WITH_MISSING2

Simulated survival expand-with-missing dataset 2
SURVIVAL.EXPAND_WITH_MISSING1

Simulated survival expand-with-missing dataset 1
dsListWorkspaces,DSLiteConnection-method

List workspaces
dsListPackages,DSLiteConnection-method

List packages
DSLiteDriver-class

Class DSLiteDriver with constructor DSLite.
TESTING.DATASET1

Simulated dataset TESTING.DATASET 1
DSLiteConnection-class

Class DSLiteConnection.
dsGetInfo,DSLiteResult-method

Get result info
newDSLiteServer

Create a new DSLite server
dsRmSymbol,DSLiteConnection-method

Remove a R symbol
setupCNSIMTest

Setup a test environment based on the CNSIM simulated datasets
dsAssignExpr,DSLiteConnection-method

Assign the result of an expression
dsSaveWorkspace,DSLiteConnection-method

Save workspace
dsRmWorkspace,DSLiteConnection-method

Remove a workspace
dsAggregate,DSLiteConnection-method

Aggregate data
setupDSLiteServer

Setup an environment based on named datasets and logindata
setupDISCORDANTTest

Setup a test environment based on the DISCORDANT simulated datasets
logindata.dslite.dasim

DataSHIELD login data for the DASIM simulated datasets
dsConnect,DSLiteDriver-method

Connect to a DSLite server
dsListSymbols,DSLiteConnection-method

List R symbols
dsDisconnect,DSLiteConnection-method

Disconnect from a DSLite server
dsListResources,DSLiteConnection-method

List DSLite server resources
setupSURVIVALTest

Setup a test environment based on the SURVIVAL (EXPAND_WITH_MISSING) simulated datasets
logindata.dslite.discordant

DataSHIELD login data for the DISCORDANT simulated datasets
dsListTables,DSLiteConnection-method

List DSLite server datasets
logindata.dslite.testing.dataset

DataSHIELD login data for the TESTING.DATASET simulated datasets
logindata.dslite.survival.expand_with_missing

DataSHIELD login data for the simulated survival expand-with-missing datasets
setupDASIMTest

Setup a test environment based on the DASIM simulated datasets
setupDATASETTest

Setup a test environment based on the TESTING.DATASET simulated datasets
dsHasTable,DSLiteConnection-method

Verify DSLite server dataset
logindata.dslite.cnsim

DataSHIELD login data for the CNSIM simulated datasets
getDSLiteData

Get data value from DSLite connection(s)
dsHasResource,DSLiteConnection-method

Verify DSLite server resource