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

476

Version

1.4.1

License

LGPL (>= 2.1)

Issues

Pull Requests

Stars

Forks

Maintainer

Yannick Marcon

Last Published

July 25th, 2025

Functions in DSLite (1.4.1)

DSLite

Create a DSLite driver
FunctionNode

Function AST node
FormulaNode

Formula AST node
DSLiteConnection-class

Class DSLiteConnection.
DSLiteServer

Lightweight DataSHIELD server-side component
Node

Simple AST node
GroupNode

Group AST node
NumericNode

Numeric AST node
DSLiteDriver-class

Class DSLiteDriver with constructor DSLite.
DSLiteResult-class

Class DSLiteResult.
ParameterNode

Parameter AST node
SymbolNode

Symbol AST node
TESTING.DATASET1

Simulated dataset TESTING.DATASET 1
SURVIVAL.EXPAND_WITH_MISSING3

Simulated survival expand-with-missing dataset 3
dsAssignExpr,DSLiteConnection-method

Assign the result of an expression
UnaryOpNode

Unary operator AST node
dsListResources,DSLiteConnection-method

List DSLite server resources
dsListSymbols,DSLiteConnection-method

List R symbols
dsListProfiles,DSLiteConnection-method

List profiles
dsAssignResource,DSLiteConnection-method

Assign a resource
StringNode

String AST node
dsIsCompleted,DSLiteResult-method

Get whether the operation is completed
dsKeepAlive,DSLiteConnection-method

Keep connection with a DSLite server alive
TESTING.DATASET2

Simulated dataset TESTING.DATASET 2
dsListWorkspaces,DSLiteConnection-method

List workspaces
SURVIVAL.EXPAND_WITH_MISSING1

Simulated survival expand-with-missing dataset 1
TESTING.DATASET3

Simulated dataset TESTING.DATASET 3
SURVIVAL.EXPAND_WITH_MISSING2

Simulated survival expand-with-missing dataset 2
defaultDSConfiguration

Default DataSHIELD configuration
dsAssignTable,DSLiteConnection-method

Assign a table
dsDisconnect,DSLiteConnection-method

Disconnect from a DSLite server
dsFetch,DSLiteResult-method

Fetch the result
RangeNode

Range AST node
dsSaveWorkspace,DSLiteConnection-method

Save workspace
dsHasTable,DSLiteConnection-method

Verify DSLite server dataset
dsAggregate,DSLiteConnection-method

Aggregate data
.strToList

Parse a key pairs string to a list
dsIsAsync,DSLiteConnection-method

DSLite asynchronous support
dsGetInfo,DSLiteResult-method

Get result info
logindata.dslite.dasim

DataSHIELD login data for the DASIM simulated datasets
logindata.dslite.cnsim

DataSHIELD login data for the CNSIM simulated datasets
dsRmSymbol,DSLiteConnection-method

Remove a R symbol
dsListPackages,DSLiteConnection-method

List packages
dsListMethods,DSLiteConnection-method

List methods
dsConnect,DSLiteDriver-method

Connect to a DSLite server
dsListTables,DSLiteConnection-method

List DSLite server datasets
setupDATASETTest

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

Restore workspace
setupCNSIMTest

Setup a test environment based on the CNSIM simulated datasets
logindata.dslite.discordant

DataSHIELD login data for the DISCORDANT simulated datasets
getDSLiteData

Get data value from DSLite connection(s)
newDSLiteServer

Create a new DSLite server
dsHasResource,DSLiteConnection-method

Verify DSLite server resource
dsRmWorkspace,DSLiteConnection-method

Remove a workspace
setupDSLiteServer

Setup an environment based on named datasets and logindata
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
setupDISCORDANTTest

Setup a test environment based on the DISCORDANT simulated datasets
setupSURVIVALTest

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

Setup a test environment based on the DASIM simulated datasets
testParse

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

Binary operation AST node
DISCORDANT_STUDY1

Simulated dataset DISCORDANT 1
CNSIM1

Simulated dataset CNSIM 1
DASIM3

Simulated dataset DASIM 3
CNSIM3

Simulated dataset CNSIM 3
DISCORDANT_STUDY2

Simulated dataset DISCORDANT 2
CNSIM2

Simulated dataset CNSIM 2
DASIM1

Simulated dataset DASIM 1
DASIM2

Simulated dataset DASIM 2
DISCORDANT_STUDY3

Simulated dataset DISCORDANT 3