Learn R Programming

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

468

Version

1.4.0

License

LGPL (>= 2.1)

Issues

Pull Requests

Stars

Forks

Maintainer

Yannick Marcon

Last Published

October 7th, 2022

Functions in DSLite (1.4.0)

DISCORDANT_STUDY2

Simulated dataset DISCORDANT 2
DISCORDANT_STUDY1

Simulated dataset DISCORDANT 1
BinaryOpNode

Binary operation AST node
DSLiteServer

Lightweight DataSHIELD server-side component
CNSIM1

Simulated dataset CNSIM 1
DASIM3

Simulated dataset DASIM 3
DISCORDANT_STUDY3

Simulated dataset DISCORDANT 3
Node

Simple AST node
FormulaNode

Formula AST node
DSLite

Create a DSLite driver
DASIM1

Simulated dataset DASIM 1
SURVIVAL.EXPAND_WITH_MISSING2

Simulated survival expand-with-missing dataset 2
DASIM2

Simulated dataset DASIM 2
SURVIVAL.EXPAND_WITH_MISSING1

Simulated survival expand-with-missing dataset 1
DSLiteDriver-class

Class DSLiteDriver with constructor DSLite.
FunctionNode

Function AST node
TESTING.DATASET2

Simulated dataset TESTING.DATASET 2
NumericNode

Numeric AST node
GroupNode

Group AST node
dsDisconnect,DSLiteConnection-method

Disconnect from a DSLite server
TESTING.DATASET3

Simulated dataset TESTING.DATASET 3
dsFetch,DSLiteResult-method

Fetch the result
dsKeepAlive,DSLiteConnection-method

Keep connection with a DSLite server alive
dsIsCompleted,DSLiteResult-method

Get whether the operation is completed
DSLiteConnection-class

Class DSLiteConnection.
dsListSymbols,DSLiteConnection-method

List R symbols
SymbolNode

Symbol AST node
dsListTables,DSLiteConnection-method

List DSLite server datasets
dsSaveWorkspace,DSLiteConnection-method

Save workspace
.strToList

Parse a key pairs string to a list
TESTING.DATASET1

Simulated dataset TESTING.DATASET 1
dsAssignExpr,DSLiteConnection-method

Assign the result of an expression
StringNode

String AST node
SURVIVAL.EXPAND_WITH_MISSING3

Simulated survival expand-with-missing dataset 3
setupDATASETTest

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

Assign a table
setupDISCORDANTTest

Setup a test environment based on the DISCORDANT simulated datasets
dsAggregate,DSLiteConnection-method

Aggregate data
getDSLiteData

Get data value from DSLite connection(s)
ParameterNode

Parameter AST node
DSLiteResult-class

Class DSLiteResult.
logindata.dslite.testing.dataset

DataSHIELD login data for the TESTING.DATASET simulated datasets
newDSLiteServer

Create a new DSLite server
RangeNode

Range AST node
UnaryOpNode

Unary operator AST node
dsGetInfo,DSLiteResult-method

Get result info
dsAssignResource,DSLiteConnection-method

Assign a resource
dsListProfiles,DSLiteConnection-method

List profiles
dsListResources,DSLiteConnection-method

List DSLite server resources
dsListWorkspaces,DSLiteConnection-method

List workspaces
dsRestoreWorkspace,DSLiteConnection-method

Restore workspace
setupCNSIMTest

Setup a test environment based on the CNSIM simulated datasets
setupDASIMTest

Setup a test environment based on the DASIM simulated datasets
dsHasResource,DSLiteConnection-method

Verify DSLite server resource
dsIsAsync,DSLiteConnection-method

DSLite asynchronous support
dsHasTable,DSLiteConnection-method

Verify DSLite server dataset
dsConnect,DSLiteDriver-method

Connect to a DSLite server
dsRmSymbol,DSLiteConnection-method

Remove a R symbol
logindata.dslite.discordant

DataSHIELD login data for the DISCORDANT simulated datasets
defaultDSConfiguration

Default DataSHIELD configuration
dsRmWorkspace,DSLiteConnection-method

Remove a workspace
logindata.dslite.survival.expand_with_missing

DataSHIELD login data for the simulated survival expand-with-missing datasets
dsListMethods,DSLiteConnection-method

List methods
dsListPackages,DSLiteConnection-method

List packages
logindata.dslite.cnsim

DataSHIELD login data for the CNSIM simulated datasets
logindata.dslite.dasim

DataSHIELD login data for the DASIM simulated datasets
setupSURVIVALTest

Setup a test environment based on the SURVIVAL (EXPAND_WITH_MISSING) simulated datasets
setupDSLiteServer

Setup an environment based on named datasets and logindata
testParse

Parse an expression according to DataSHIELD syntax rules and returns an Abstract Syntaxic Tree (AST) node.
CNSIM2

Simulated dataset CNSIM 2
CNSIM3

Simulated dataset CNSIM 3