DSLiteServer mimics a DataSHIELD server by holding datasets and exposing DataSHIELD-like functions: aggregate and assign. A DataSHIELD session is a R environment where the assignment and the operations happen.
Methods Methodnew()
Create new DSLiteServer instance. See defaultDSConfiguration function for including or excluding packages when discovering the DataSHIELD configuration from the DataSHIELD server-side packages (meta-data from the DESCRIPTION files).
Argumentstables
A named list of data.frames representing the harmonized tables.
resources
A named list of resourcer::Resource
objects representing accessible data or computation resources.
config
The DataSHIELD configuration. Default is to discover it from the DataSHIELD server-side R packages.
strict
Logical to specify whether the DataSHIELD configuration must be strictly applied. Default is TRUE.
home
Folder location where are located the session work directory and where to read and dump workspace images.
profile
The DataSHIELD profile name, used to give a name to the DS configuration. Default is "default". Default is in a hidden folder of the R session's temporary directory.
A DSLiteServer object
Methodconfig()
Get or set the DataSHIELD configuration.
UsageDSLiteServer$config(value)
Arguments
value
The DataSHIELD configuration: aggregate/assign methods in data frames and a named list of options.
The DataSHIELD configuration, if no parameter is provided.
Methodprofile()
Get or set the DataSHIELD profile name.
UsageDSLiteServer$profile(value)
Arguments
value
The DataSHIELD profile name.
The DataSHIELD profile, if no parameter is provided.
Methodstrict()
Get or set the level of strictness (stop when function call is not configured)
UsageDSLiteServer$strict(value)
Arguments
value
The strict
logical field.
The strict field if no parameter is provided.
Methodhome()
Get or set the home folder location where are located the session work directories and where to read and dump workspace images.
Argumentsvalue
The path to the home folder.
The home folder path if no parameter is provided.
Methodworkspaces()
List the saved workspaces in the home
folder.
DSLiteServer$workspaces(prefix = NULL)
Arguments
prefix
Filter workspaces starting with provided prefix (optional).
workspace_save()
Save the session's workspace image identified by the sid
identifier with the provided name
in the home
folder.
DSLiteServer$workspace_save(sid, name)
Arguments
sid,
Session ID
name
The name to be given to the workspace's image.
workspace_restore()
Restore a saved session's workspace image into the session identified by the sid
identifier with the provided name
in the home
folder.
DSLiteServer$workspace_restore(sid, name)
Arguments
sid,
Session ID
name
The name of the workspace's image to restore.
workspace_rm()
Remove the workspace image with the provided name
from the home
folder.
DSLiteServer$workspace_rm(name)
Arguments
name
The name of the workspace.
aggregateMethods()
Get or set the aggregate methods.
UsageDSLiteServer$aggregateMethods(value)
Arguments
value
A data.frame
with columns: name
(the client function call), value
(the translated server call), package
(relevant when extracted from a DataSHIELD server-side package), version
(relevant when extracted from a DataSHIELD server-side package), type
("aggregate"), class
("function" for package functions or "script" for custom scripts).
The aggregate methods when no parameter is provided.
MethodaggregateMethod()
Get or set an aggregate method.
UsageDSLiteServer$aggregateMethod(name, value)
Arguments
name
The client function call.
value
The translated server call: either a package function reference or function expression. Remove the method when NULL
.
The aggregate method when no value
parameter is provided.
assignMethods()
Get or set the assign methods.
UsageDSLiteServer$assignMethods(value)
Arguments
value
A data.frame
with columns: name
(the client function call), value
(the translated server call), package
(relevant when extracted from a DataSHIELD server-side package), version
(relevant when extracted from a DataSHIELD server-side package), type
("assign"), class
("function" for package functions or "script" for custom scripts).
The assign methods when no parameter is provided.
MethodassignMethod()
Get or set an assign method.
UsageDSLiteServer$assignMethod(name, value)
Arguments
name
The client function call
value
The translated server call: either a package function reference or function expression. Remove the method when NULL
.
The assign method when no value
parameter is provided.
options()
Get or set the DataSHIELD R options that are applied when a new DataSHIELD session is started.
UsageDSLiteServer$options(value)
Arguments
value
A named list of options.
The R options when no parameter is provided.
Methodoption()
Get or set a R option.
UsageDSLiteServer$option(key, value)
Arguments
key
The R option's name.
value
The R option's value. Remove the option when NULL
.
The R option's value when only key
parameter is provided.
newSession()
Create a new DataSHIELD session (contained execution environment), apply options that are defined in the DataSHIELD configuration and restore workspace image if restore
workspace name argument is provided.
DSLiteServer$newSession(restore = NULL, profile = NULL)
Arguments
restore
The workspace image to be restored (optional).
profile
The requested profile name (optional). If provided, new session creation will fail in case it does not match the server's profile name.
hasSession()
Check a DataSHIELD session is alive.
UsageDSLiteServer$hasSession(sid)
Method getSession()
Get the DataSHIELD session's environment.
UsageDSLiteServer$getSession(sid)
Method getSessionIds()
Get the DataSHIELD session IDs.
UsageDSLiteServer$getSessionIds()
Method getSessionData()
Get the symbol value from the DataSHIELD session's environment.
UsageDSLiteServer$getSessionData(sid, symbol)
Arguments
sid
The session ID.
symbol
The symbol name.
closeSession()
Destroy DataSHIELD session and save workspace image if save
workspace name argument is provided.
DSLiteServer$closeSession(sid, save = NULL)
Arguments
sid
The session ID.
save
The name of the workspace image to be saved (optional).
tableNames()
List the names of the tables that can be assigned.
UsageDSLiteServer$tableNames()
Method hasTable()
Check a table exists.
UsageDSLiteServer$hasTable(name)
Arguments
name
The table name to be looked for.
resourceNames()
List the names of the resources (resourcer::Resource
objects) that can be assigned.
DSLiteServer$resourceNames()
Method hasResource()
Check a resource (resourcer::Resource
object) exists.
DSLiteServer$hasResource(name)
Arguments
name
The resource name to be looked for.
symbols()
List the symbols living in a DataSHIELD session.
UsageDSLiteServer$symbols(sid)
Method symbol_rm()
Remove a symbol from a DataSHIELD session.
UsageDSLiteServer$symbol_rm(sid, name)
Arguments
sid
The session ID.
name
The symbol name.
assignTable()
Assign a table to a symbol in a DataSHIELD session. Filter table columns with the variables names provided.
UsageDSLiteServer$assignTable(sid, symbol, name, variables = NULL, id.name = NULL)
Arguments
sid
The session ID.
symbol
The symbol to be assigned.
name
The table's name.
variables
The variable names to be filtered in (optional).
id.name
The column name to be used for the entity's identifier (optional).
assignResource()
Assign a resource as a resourcer::ResourceClient
object to a symbol in a DataSHIELD session.
DSLiteServer$assignResource(sid, symbol, name)
Arguments
sid
The session ID.
symbol
The symbol name.
name
The name of the resource.
assignExpr()
Evaluate an assignment expression in a DataSHIELD session.
UsageDSLiteServer$assignExpr(sid, symbol, expr)
Arguments
sid
The session ID.
symbol
The symbol name.
expr
The R expression to evaluate.
aggregate()
Evaluate an aggregate expression in a DataSHIELD session.
UsageDSLiteServer$aggregate(sid, expr)
Arguments
sid
The session ID.
expr
The R expression to evaluate.
clone()
The objects of this class are cloneable with this method.
UsageDSLiteServer$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4