Title: | 'DataSHIELD' Client for 'MOLGENIS Armadillo' |
---|---|
Description: | 'DataSHIELD' is an infrastructure and series of R packages that enables the remote and 'non-disclosive' analysis of sensitive research data. This package is the 'DataSHIELD' interface implementation to analyze data shared on a 'MOLGENIS Armadillo' server. 'MOLGENIS Armadillo' is a light-weight 'DataSHIELD' server using a file store and an 'RServe' server. |
Authors: | Mariska Slofstra [aut, cre] |
Maintainer: | Mariska Slofstra <[email protected]> |
License: | LGPL (>= 2.1) |
Version: | 2.0.10 |
Built: | 2025-02-20 05:01:06 UTC |
Source: | https://github.com/molgenis/molgenis-r-datashield |
Convenience function for creating a [ArmadilloDriver] object.
armadillo()
armadillo()
Get an ID token to log in on an Armadillo server
armadillo.get_token(server)
armadillo.get_token(server)
server |
the URL of the Armadillo server |
The ID token string
Aggregate some data from the DataSHIELD R session using a valid R expression. The aggregation expression must satisfy the data repository's DataSHIELD configuration.
## S4 method for signature 'ArmadilloConnection' dsAggregate(conn, expr, async = TRUE)
## S4 method for signature 'ArmadilloConnection' dsAggregate(conn, expr, async = TRUE)
conn |
|
expr |
Expression to evaluate. |
async |
Whether the result of the call should be retrieved asynchronously. When TRUE (default) the calls are parallelized over the connections, when the connection supports that feature, with an extra overhead of requests. |
Assign a result of the execution of an expression in the DataSHIELD R session.
## S4 method for signature 'ArmadilloConnection' dsAssignExpr(conn, symbol, expr, async = TRUE)
## S4 method for signature 'ArmadilloConnection' dsAssignExpr(conn, symbol, expr, async = TRUE)
conn |
|
symbol |
Name of the R symbol. |
expr |
A R expression with allowed assign functions calls. |
async |
Whether the result of the call should be retrieved asynchronously. When TRUE (default) the calls are parallelized over the connections, when the connection supports that feature, with an extra overhead of requests. |
A ArmadilloResult-class
object.
Assign a resource in the DataSHIELD R session.
## S4 method for signature 'ArmadilloConnection' dsAssignResource(conn, symbol, resource, async = TRUE)
## S4 method for signature 'ArmadilloConnection' dsAssignResource(conn, symbol, resource, async = TRUE)
conn |
An object that inherits from |
symbol |
Name of the R symbol. |
resource |
Fully qualified name of a resource reference in the data repository. |
async |
Whether the result of the call should be retrieved asynchronously. |
A ArmadilloResult-class
object.
Assign a R-data.frame in the DataSHIELD R session.
## S4 method for signature 'ArmadilloConnection' dsAssignTable( conn, symbol, table, variables = NULL, missings = FALSE, identifiers = NULL, id.name = NULL, async = TRUE )
## S4 method for signature 'ArmadilloConnection' dsAssignTable( conn, symbol, table, variables = NULL, missings = FALSE, identifiers = NULL, id.name = NULL, async = TRUE )
conn |
|
symbol |
Name of the R symbol. |
table |
Fully qualified name of the table. |
variables |
The variables to load. |
missings |
Not supported |
identifiers |
Not supported |
id.name |
Not supported |
async |
When set, do not wait for the result. |
A ArmadilloResult-class
object.
Connect to an Armadillo DataSHIELD service, with provided credentials.
## S4 method for signature 'ArmadilloDriver' dsConnect( drv, name, restore = NULL, username = "", password = "", token = "", url, profile = "default", opts = list(), ... )
## S4 method for signature 'ArmadilloDriver' dsConnect( drv, name, restore = NULL, username = "", password = "", token = "", url, profile = "default", opts = list(), ... )
drv |
|
name |
Name of the connection, which must be unique among all the DataSHIELD connections. |
restore |
Workspace name to be restored in the newly created DataSHIELD R session. |
username |
The username to authenticate with. |
password |
The password to authenticate with. |
token |
The ID token to authenticate with. |
url |
URL of the server. |
profile |
the profile to select, default "default" |
opts |
Curl options as described by httr (call httr::httr_options() for details). Can be provided by "Armadillo.opts" option. |
... |
Unused, needed for compatibility with generic. |
A ArmadilloConnection-class
object.
Disconnect from an Armadillo DataSHIELD Service and release all R resources. If a workspace ID is provided, the DataSHIELD R session will be saved before being destroyed.
## S4 method for signature 'ArmadilloConnection' dsDisconnect(conn, save = NULL)
## S4 method for signature 'ArmadilloConnection' dsDisconnect(conn, save = NULL)
conn |
|
save |
Save the DataSHIELD R session with provided ID (must be a character string). |
Fetch the DataSHIELD operation result.
## S4 method for signature 'ArmadilloResult' dsFetch(res)
## S4 method for signature 'ArmadilloResult' dsFetch(res)
res |
|
TRUE if table exists.
Get information about a connection.
## S4 method for signature 'ArmadilloConnection' dsGetInfo(dsObj, ...)
## S4 method for signature 'ArmadilloConnection' dsGetInfo(dsObj, ...)
dsObj |
|
... |
Unused, needed for compatibility with generic. |
The connection information. This should report the version of the data repository application ('repo.version') and its name ('repo.name'), the database name ('dbname'), username, ('username'), host ('host'), port ('port'), etc. It MAY also include any other arguments related to the connection (e.g., thread id, socket or TCP connection type). It MUST NOT include the password.
Get information about a driver.
## S4 method for signature 'ArmadilloDriver' dsGetInfo(dsObj, ...)
## S4 method for signature 'ArmadilloDriver' dsGetInfo(dsObj, ...)
dsObj |
|
... |
Unused, needed for compatibility with generic. |
The connection information. This returns the version of the package ('driver.version'). There is no underlying client library.
Await completion and get the information about a command (if still available).
## S4 method for signature 'ArmadilloResult' dsGetInfo(dsObj, ...)
## S4 method for signature 'ArmadilloResult' dsGetInfo(dsObj, ...)
dsObj |
|
... |
Unused, needed for compatibility with generic. |
The result information. This should include the R expression being executed ('expression') and if the query is complete ('{ "status" = "COMPLETED" }').
Verify resource exists.
## S4 method for signature 'ArmadilloConnection' dsHasResource(conn, resource)
## S4 method for signature 'ArmadilloConnection' dsHasResource(conn, resource)
conn |
|
resource |
The identifier of the resource |
TRUE if resource exists.
Verify table exist and can be accessible for performing DataSHIELD operations.
## S4 method for signature 'ArmadilloConnection' dsHasTable(conn, table)
## S4 method for signature 'ArmadilloConnection' dsHasTable(conn, table)
conn |
|
table |
The identifier of the table |
TRUE if table exists.
List of DataSHIELD operations on which Armadillo DataSHIELD Service supports asynchronicity.
## S4 method for signature 'ArmadilloConnection' dsIsAsync(conn)
## S4 method for signature 'ArmadilloConnection' dsIsAsync(conn)
conn |
|
When a DSResult-class
object is returned on aggregation or
assignment operation, the raw result can be accessed asynchronously,
allowing parallelization of DataSHIELD calls over multpile servers.
The returned named list of logicals will specify if asynchronicity is
supported for:
aggregation operation ('aggregate'),
table assignment operation ('assignTable'),
resource assignment operation ('assignResource')
and expression assignment operation ('assignExpr').
The named list of logicals detailing the asynchronicity support.
Get whether the result from a previous assignment or aggregation operation was completed, either with a successful status or a failed one. This call must not wait for the completion, immediate response is expected. Once the result is identified as being completed, the raw result the operation can be got directly.
## S4 method for signature 'ArmadilloResult' dsIsCompleted(res)
## S4 method for signature 'ArmadilloResult' dsIsCompleted(res)
res |
|
TRUE if operation is completed.
As the DataSHIELD sessions are working in parallel, this function helps at keeping idle connections alive while others are working. Any communication failure must be silently processed.
## S4 method for signature 'ArmadilloConnection' dsKeepAlive(conn)
## S4 method for signature 'ArmadilloConnection' dsKeepAlive(conn)
conn |
|
NULL, invisibly
List methods defined in the DataSHIELD configuration.
## S4 method for signature 'ArmadilloConnection' dsListMethods(conn, type = "aggregate")
## S4 method for signature 'ArmadilloConnection' dsListMethods(conn, type = "aggregate")
conn |
|
type |
Type of the method: "aggregate" (default) or "assign". |
A data.frame with columns: name, type ('aggregate' or 'assign'), class ('function' or 'script'), value, package, version.
List packages with their versions defined in the DataSHIELD configuration.
## S4 method for signature 'ArmadilloConnection' dsListPackages(conn)
## S4 method for signature 'ArmadilloConnection' dsListPackages(conn)
conn |
|
A data.frame with columns: name, version.
List Armadillo DataSHIELD Service resources that may be accessible for performing DataSHIELD operations.
## S4 method for signature 'ArmadilloConnection' dsListResources(conn)
## S4 method for signature 'ArmadilloConnection' dsListResources(conn)
conn |
|
The fully qualified names of the resources.
List symbols living in the DataSHIELD R session.
## S4 method for signature 'ArmadilloConnection' dsListSymbols(conn)
## S4 method for signature 'ArmadilloConnection' dsListSymbols(conn)
conn |
|
A character vector.
List Armadillo DataSHIELD Service tables that may be accessible for performing DataSHIELD operations.
## S4 method for signature 'ArmadilloConnection' dsListTables(conn)
## S4 method for signature 'ArmadilloConnection' dsListTables(conn)
conn |
|
The fully qualified names of the tables.
List workspaces saved in the data repository.
## S4 method for signature 'ArmadilloConnection' dsListWorkspaces(conn)
## S4 method for signature 'ArmadilloConnection' dsListWorkspaces(conn)
conn |
|
A data.frame with columns: name, lastAccessDate, size, user.
Remove a symbol living in the DataSHIELD R session. After removal, the data identified by the symbol will not be accessible in the DataSHIELD R session on the server side.
## S4 method for signature 'ArmadilloConnection' dsRmSymbol(conn, symbol)
## S4 method for signature 'ArmadilloConnection' dsRmSymbol(conn, symbol)
conn |
|
symbol |
Name of the R symbol. |
Remove a workspace on the data repository.
## S4 method for signature 'ArmadilloConnection' dsRmWorkspace(conn, name)
## S4 method for signature 'ArmadilloConnection' dsRmWorkspace(conn, name)
conn |
|
name |
Name of the workspace. |
Save workspace on the data repository.
## S4 method for signature 'ArmadilloConnection' dsSaveWorkspace(conn, name)
## S4 method for signature 'ArmadilloConnection' dsSaveWorkspace(conn, name)
conn |
|
name |
Name of the workspace. |