Title: | 'DataSHIELD' Implementation on Local Datasets |
---|---|
Description: | 'DataSHIELD' is an infrastructure and series of R packages that enables the remote and 'non-disclosive' analysis of sensitive research data. This 'DataSHIELD Interface' implementation is for analyzing datasets living in the current R session. The purpose of this is primarily for lightweight 'DataSHIELD' analysis package development. |
Authors: | Yannick Marcon [aut, cre] |
Maintainer: | Yannick Marcon <[email protected]> |
License: | LGPL (>= 2.1) |
Version: | 1.5.0 |
Built: | 2024-10-27 03:18:47 UTC |
Source: | https://github.com/datashield/dslite |
AST node that represents a binary operation (such as '+', '-' etc.), and therefore having two child nodes.
DSLite::Node
-> BinaryOpNode
add_child()
Two children
BinaryOpNode$add_child(val)
val
Child Node
to_string()
Get the string representation of the BinaryOpNode
BinaryOpNode$to_string()
clone()
The objects of this class are cloneable with this method.
BinaryOpNode$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
FormulaNode
,
FunctionNode
,
GroupNode
,
Node
,
NumericNode
,
ParameterNode
,
RangeNode
,
StringNode
,
SymbolNode
,
UnaryOpNode
Simulated dataset CNSIM 1, in a data.frame with 2163 observations of 11 harmonized variables. The CNSIM dataset contains synthetic data based on a model derived from the participants of the 1958 Birth Cohort, as part of the obesity methodological development project. This dataset does contain some NA values.
Variable | Description | Type | Note |
LAB_TSC | Total Serum Cholesterol | numeric | mmol/L |
LAB_TRIG | Triglycerides | numeric | mmol/L |
LAB_HDL | HDL Cholesterol | numeric | mmol/L |
LAB_GLUC_ADJUSTED | Non-Fasting Glucose | numeric | mmol/L |
PM_BMI_CONTINUOUS | Body Mass Index (continuous) | numeric | kg/m2 |
DIS_CVA | History of Stroke | factor | 0 = Never had stroke, 1 = Has had stroke |
MEDI_LPD | Current Use of Lipid Lowering Medication (from categorical assessment item) | factor | 0 = Not currently using lipid lowering medication, 1 = Currently using lipid lowering medication |
DIS_DIAB | History of Diabetes | factor | 0 = Never had diabetes, 1 = Has had diabetes |
DIS_AMI | History of Myocardial Infarction | factor | 0 = Never had myocardial infarction, 1 = Has had myocardial infarction |
GENDER | Gender | factor | 0 = Female, 1 = Male |
PM_BMI_CATEGORICAL | Body Mass Index (categorical) | factor | 1 = Less than 25 kg/m2, 2 = 25 to 30 kg/m2, 3 = Over 30 kg/m2 |
Simulated dataset CNSIM 1, in a data.frame with 3088 observations of 11 harmonized variables variables. The CNSIM dataset contains synthetic data based on a model derived from the participants of the 1958 Birth Cohort, as part of the obesity methodological development project. This dataset does contain some NA values.
Variable | Description | Type | Note |
LAB_TSC | Total Serum Cholesterol | numeric | mmol/L |
LAB_TRIG | Triglycerides | numeric | mmol/L |
LAB_HDL | HDL Cholesterol | numeric | mmol/L |
LAB_GLUC_ADJUSTED | Non-Fasting Glucose | numeric | mmol/L |
PM_BMI_CONTINUOUS | Body Mass Index (continuous) | numeric | kg/m2 |
DIS_CVA | History of Stroke | factor | 0 = Never had stroke, 1 = Has had stroke |
MEDI_LPD | Current Use of Lipid Lowering Medication (from categorical assessment item) | factor | 0 = Not currently using lipid lowering medication, 1 = Currently using lipid lowering medication |
DIS_DIAB | History of Diabetes | factor | 0 = Never had diabetes, 1 = Has had diabetes |
DIS_AMI | History of Myocardial Infarction | factor | 0 = Never had myocardial infarction, 1 = Has had myocardial infarction |
GENDER | Gender | factor | 0 = Female, 1 = Male |
PM_BMI_CATEGORICAL | Body Mass Index (categorical) | factor | 1 = Less than 25 kg/m2, 2 = 25 to 30 kg/m2, 3 = Over 30 kg/m2 |
Simulated dataset CNSIM 1, in a data.frame with 4128 observations of 11 harmonized variables variables. The CNSIM dataset contains synthetic data based on a model derived from the participants of the 1958 Birth Cohort, as part of the obesity methodological development project. This dataset does contain some NA values.
Variable | Description | Type | Note |
LAB_TSC | Total Serum Cholesterol | numeric | mmol/L |
LAB_TRIG | Triglycerides | numeric | mmol/L |
LAB_HDL | HDL Cholesterol | numeric | mmol/L |
LAB_GLUC_ADJUSTED | Non-Fasting Glucose | numeric | mmol/L |
PM_BMI_CONTINUOUS | Body Mass Index (continuous) | numeric | kg/m2 |
DIS_CVA | History of Stroke | factor | 0 = Never had stroke, 1 = Has had stroke |
MEDI_LPD | Current Use of Lipid Lowering Medication (from categorical assessment item) | factor | 0 = Not currently using lipid lowering medication, 1 = Currently using lipid lowering medication |
DIS_DIAB | History of Diabetes | factor | 0 = Never had diabetes, 1 = Has had diabetes |
DIS_AMI | History of Myocardial Infarction | factor | 0 = Never had myocardial infarction, 1 = Has had myocardial infarction |
GENDER | Gender | factor | 0 = Female, 1 = Male |
PM_BMI_CATEGORICAL | Body Mass Index (categorical) | factor | 1 = Less than 25 kg/m2, 2 = 25 to 30 kg/m2, 3 = Over 30 kg/m2 |
Simulated dataset DASIM 1, in a data.frame with 10000 observations of 10 harmonized variables. The DASIM dataset contains synthetic data based on a model derived from the participants of the 1958 Birth Cohort, as part of the obesity methodological development project. This dataset does not contain some NA values.
Variable | Description | Type | Note |
LAB_TSC | Total Serum Cholesterol | numeric | mmol/L |
LAB_TRIG | Triglycerides | numeric | mmol/L |
LAB_HDL | HDL Cholesterol | numeric | mmol/L |
LAB_GLUC_FASTING | Fasting Glucose | numeric | mmol/L |
PM_BMI_CONTINUOUS | Body Mass Index (continuous) | numeric | kg/m2 |
DIS_CVA | History of Stroke | factor | 0 = Never had stroke, 1 = Has had stroke |
DIS_DIAB | History of Diabetes | factor | 0 = Never had diabetes, 1 = Has had diabetes |
DIS_AMI | History of Myocardial Infarction | factor | 0 = Never had myocardial infarction, 1 = Has had myocardial infarction |
GENDER | Gender | factor | 0 = Female, 1 = Male |
PM_BMI_CATEGORICAL | Body Mass Index (categorical) | factor | 1 = Less than 25 kg/m2, 2 = 25 to 30 kg/m2, 3 = Over 30 kg/m2 |
Simulated dataset DASIM 2, in a data.frame with 10000 observations of 10 harmonized variables. The DASIM dataset contains synthetic data based on a model derived from the participants of the 1958 Birth Cohort, as part of the obesity methodological development project. This dataset does not contain some NA values.
Variable | Description | Type | Note |
LAB_TSC | Total Serum Cholesterol | numeric | mmol/L |
LAB_TRIG | Triglycerides | numeric | mmol/L |
LAB_HDL | HDL Cholesterol | numeric | mmol/L |
LAB_GLUC_FASTING | Fasting Glucose | numeric | mmol/L |
PM_BMI_CONTINUOUS | Body Mass Index (continuous) | numeric | kg/m2 |
DIS_CVA | History of Stroke | factor | 0 = Never had stroke, 1 = Has had stroke |
DIS_DIAB | History of Diabetes | factor | 0 = Never had diabetes, 1 = Has had diabetes |
DIS_AMI | History of Myocardial Infarction | factor | 0 = Never had myocardial infarction, 1 = Has had myocardial infarction |
GENDER | Gender | factor | 0 = Female, 1 = Male |
PM_BMI_CATEGORICAL | Body Mass Index (categorical) | factor | 1 = Less than 25 kg/m2, 2 = 25 to 30 kg/m2, 3 = Over 30 kg/m2 |
Simulated dataset DASIM 3, in a data.frame with 10000 observations of 10 harmonized variables. The DASIM dataset contains synthetic data based on a model derived from the participants of the 1958 Birth Cohort, as part of the obesity methodological development project. This dataset does not contain some NA values.
Variable | Description | Type | Note |
LAB_TSC | Total Serum Cholesterol | numeric | mmol/L |
LAB_TRIG | Triglycerides | numeric | mmol/L |
LAB_HDL | HDL Cholesterol | numeric | mmol/L |
LAB_GLUC_FASTING | Fasting Glucose | numeric | mmol/L |
PM_BMI_CONTINUOUS | Body Mass Index (continuous) | numeric | kg/m2 |
DIS_CVA | History of Stroke | factor | 0 = Never had stroke, 1 = Has had stroke |
DIS_DIAB | History of Diabetes | factor | 0 = Never had diabetes, 1 = Has had diabetes |
DIS_AMI | History of Myocardial Infarction | factor | 0 = Never had myocardial infarction, 1 = Has had myocardial infarction |
GENDER | Gender | factor | 0 = Female, 1 = Male |
PM_BMI_CATEGORICAL | Body Mass Index (categorical) | factor | 1 = Less than 25 kg/m2, 2 = 25 to 30 kg/m2, 3 = Over 30 kg/m2 |
Find the R packages that have DataSHIELD server configuration information in them and extract this information in a data frame of aggregation/assignment methods and a named list of R options. The DataSHIELD packages can be filtered by specifying explicitly the package names to be included or excluded. The package exclusion prevails over the inclusion.
defaultDSConfiguration(include = NULL, exclude = NULL)
defaultDSConfiguration(include = NULL, exclude = NULL)
include |
Character vector of package names to be explicitly included. If NULL, do not filter packages. |
exclude |
Character vector of package names to be explicitly excluded. If NULL, do not filter packages. |
## Not run: # detect DS packages defaultDSConfiguration() # exclude a DS package defaultDSConfiguration(exclude="dsBase") # include explicitely some DS packages defaultDSConfiguration(include=c("dsBase", "dsOmics")) ## End(Not run)
## Not run: # detect DS packages defaultDSConfiguration() # exclude a DS package defaultDSConfiguration(exclude="dsBase") # include explicitely some DS packages defaultDSConfiguration(include=c("dsBase", "dsOmics")) ## End(Not run)
Simulated dataset DISCORDANT 1, in a data.frame with 12 observations of 2 discordant variables.
Variable | Description | Type |
A | Dummy data | integer |
B | Dummy data | integer |
Simulated dataset DISCORDANT 2, in a data.frame with 12 observations of 2 discordant variables.
Variable | Description | Type |
A | Dummy data | integer |
C | Dummy data | integer |
Simulated dataset DISCORDANT 3, in a data.frame with 12 observations of 2 discordant variables.
Variable | Description | Type |
B | Dummy data | integer |
C | Dummy data | integer |
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 'DSLiteConnection' dsAggregate(conn, expr, async = TRUE)
## S4 method for signature 'DSLiteConnection' 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 'DSLiteConnection' dsAssignExpr(conn, symbol, expr, async = TRUE)
## S4 method for signature 'DSLiteConnection' 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 DSLiteResult-class
object.
Assign a DSLite resource in the DataSHIELD R session.
## S4 method for signature 'DSLiteConnection' dsAssignResource(conn, symbol, resource, async = TRUE)
## S4 method for signature 'DSLiteConnection' dsAssignResource(conn, symbol, resource, async = TRUE)
conn |
|
symbol |
Name of the R symbol. |
resource |
Fully qualified name of a resource object living in the DSLite server. |
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 DSLiteResult-class
object.
Assign a DSLite dataset in the DataSHIELD R session.
## S4 method for signature 'DSLiteConnection' dsAssignTable( conn, symbol, table, variables = NULL, missings = FALSE, identifiers = NULL, id.name = NULL, async = TRUE )
## S4 method for signature 'DSLiteConnection' 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 a dataset living in the DSLite server. |
variables |
The variable names to be filtered in. |
missings |
Ignored. |
identifiers |
Name of the identifiers mapping to use when assigning entities to R (currently NOT supported by DSLite). |
id.name |
Name of the column that will contain the entity identifiers. If not specified, the identifiers will be the data frame row names. When specified this column can be used to perform joins between data frames. |
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 DSLiteResult-class
object.
Connect to a DSLite server, with provided datasets symbol names.
## S4 method for signature 'DSLiteDriver' dsConnect(drv, name, url, restore = NULL, profile = NULL, ...)
## S4 method for signature 'DSLiteDriver' dsConnect(drv, name, url, restore = NULL, profile = NULL, ...)
drv |
|
name |
Name of the connection, which must be unique among all the DataSHIELD connections. |
url |
A R symbol that refers to a DSLiteServer object that holds the datasets of interest. The option "datashield.env" can be used to specify where to search for this symbol value. If not specified, the environment is the global one. |
restore |
Workspace name to be restored in the newly created DataSHIELD R session. |
profile |
Name of the profile that will be given to the DSLiteServer configuration. Make different DSLiteServers to support different configurations. |
... |
Unused, needed for compatibility with generic. |
A DSLiteConnection-class
object.
Save the session in a local file if requested.
## S4 method for signature 'DSLiteConnection' dsDisconnect(conn, save = NULL)
## S4 method for signature 'DSLiteConnection' 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 'DSLiteResult' dsFetch(res)
## S4 method for signature 'DSLiteResult' dsFetch(res)
res |
|
TRUE if table exists.
Get the information about a command (if still available).
## S4 method for signature 'DSLiteResult' dsGetInfo(dsObj, ...)
## S4 method for signature 'DSLiteResult' dsGetInfo(dsObj, ...)
dsObj |
|
... |
Unused, needed for compatibility with generic. |
The result information, including its status.
Verify resource exists and can be accessible for performing DataSHIELD operations.
## S4 method for signature 'DSLiteConnection' dsHasResource(conn, resource)
## S4 method for signature 'DSLiteConnection' dsHasResource(conn, resource)
conn |
|
resource |
The fully qualified name of the resource. |
TRUE if dataset exists.
Verify dataset exists and can be accessible for performing DataSHIELD operations.
## S4 method for signature 'DSLiteConnection' dsHasTable(conn, table)
## S4 method for signature 'DSLiteConnection' dsHasTable(conn, table)
conn |
|
table |
The fully qualified name of the dataset. |
TRUE if dataset exists.
No asynchronicity on any DataSHIELD operations.
## S4 method for signature 'DSLiteConnection' dsIsAsync(conn)
## S4 method for signature 'DSLiteConnection' dsIsAsync(conn)
conn |
|
The named list of logicals detailing the asynchronicity support.
Always TRUE because of synchronous operations.
## S4 method for signature 'DSLiteResult' dsIsCompleted(res)
## S4 method for signature 'DSLiteResult' dsIsCompleted(res)
res |
|
Always TRUE.
No operation due to the DSLiteServer nature.
## S4 method for signature 'DSLiteConnection' dsKeepAlive(conn)
## S4 method for signature 'DSLiteConnection' dsKeepAlive(conn)
conn |
|
List methods defined in the DataSHIELD configuration.
## S4 method for signature 'DSLiteConnection' dsListMethods(conn, type = "aggregate")
## S4 method for signature 'DSLiteConnection' dsListMethods(conn, type = "aggregate")
conn |
|
type |
Type of the method: "aggregate" (default) or "assign". |
A data frame.
List packages defined in the DataSHIELD configuration.
## S4 method for signature 'DSLiteConnection' dsListPackages(conn)
## S4 method for signature 'DSLiteConnection' dsListPackages(conn)
conn |
|
A data frame.
List profiles defined in the DataSHIELD configuration.
## S4 method for signature 'DSLiteConnection' dsListProfiles(conn)
## S4 method for signature 'DSLiteConnection' dsListProfiles(conn)
conn |
|
A list containing the "available" character vector of profile names and the "current" profile (in case a default one was assigned).
List resource names living in the DSLite server for performing DataSHIELD operations.
## S4 method for signature 'DSLiteConnection' dsListResources(conn)
## S4 method for signature 'DSLiteConnection' dsListResources(conn)
conn |
|
The fully qualified names of the resources.
List symbols living in the DataSHIELD R session.
## S4 method for signature 'DSLiteConnection' dsListSymbols(conn)
## S4 method for signature 'DSLiteConnection' dsListSymbols(conn)
conn |
|
A character vector.
List dataset names living in the DSLite server for performing DataSHIELD operations.
## S4 method for signature 'DSLiteConnection' dsListTables(conn)
## S4 method for signature 'DSLiteConnection' dsListTables(conn)
conn |
|
The fully qualified names of the tables.
List workspaces saved in the data repository.
## S4 method for signature 'DSLiteConnection' dsListWorkspaces(conn)
## S4 method for signature 'DSLiteConnection' dsListWorkspaces(conn)
conn |
|
A data frame.
Convenient function for creating a DSLiteDriver object.
DSLite()
DSLite()
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.
new()
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).
DSLiteServer$new( tables = list(), resources = list(), config = DSLite::defaultDSConfiguration(), strict = TRUE, home = file.path(tempdir(), ".dslite"), profile = "default" )
tables
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
config()
Get or set the DataSHIELD configuration.
DSLiteServer$config(value)
value
The DataSHIELD configuration: aggregate/assign methods in data frames and a named list of options.
The DataSHIELD configuration, if no parameter is provided.
profile()
Get or set the DataSHIELD profile name.
DSLiteServer$profile(value)
value
The DataSHIELD profile name.
The DataSHIELD profile, if no parameter is provided.
strict()
Get or set the level of strictness (stop when function call is not configured)
DSLiteServer$strict(value)
value
The strict
logical field.
The strict field if no parameter is provided.
home()
Get or set the home folder location where are located the session work directories and where to read and dump workspace images.
DSLiteServer$home(value)
value
The path to the home folder.
The home folder path if no parameter is provided.
workspaces()
List the saved workspaces in the home
folder.
DSLiteServer$workspaces(prefix = NULL)
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)
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)
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)
name
The name of the workspace.
aggregateMethods()
Get or set the aggregate methods.
DSLiteServer$aggregateMethods(value)
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.
aggregateMethod()
Get or set an aggregate method.
DSLiteServer$aggregateMethod(name, value)
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.
DSLiteServer$assignMethods(value)
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.
assignMethod()
Get or set an assign method.
DSLiteServer$assignMethod(name, value)
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.
DSLiteServer$options(value)
value
A named list of options.
The R options when no parameter is provided.
option()
Get or set a R option.
DSLiteServer$option(key, value)
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)
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.
DSLiteServer$hasSession(sid)
sid
The session ID.
getSession()
Get the DataSHIELD session's environment.
DSLiteServer$getSession(sid)
sid
The session ID.
getSessionIds()
Get the DataSHIELD session IDs.
DSLiteServer$getSessionIds()
getSessionData()
Get the symbol value from the DataSHIELD session's environment.
DSLiteServer$getSessionData(sid, symbol)
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)
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.
DSLiteServer$tableNames()
hasTable()
Check a table exists.
DSLiteServer$hasTable(name)
name
The table name to be looked for.
resourceNames()
List the names of the resources (resourcer::Resource
objects) that can be assigned.
DSLiteServer$resourceNames()
hasResource()
Check a resource (resourcer::Resource
object) exists.
DSLiteServer$hasResource(name)
name
The resource name to be looked for.
symbols()
List the symbols living in a DataSHIELD session.
DSLiteServer$symbols(sid)
sid
The session ID.
symbol_rm()
Remove a symbol from a DataSHIELD session.
DSLiteServer$symbol_rm(sid, name)
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.
DSLiteServer$assignTable(sid, symbol, name, variables = NULL, id.name = NULL)
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)
sid
The session ID.
symbol
The symbol name.
name
The name of the resource.
assignExpr()
Evaluate an assignment expression in a DataSHIELD session.
DSLiteServer$assignExpr(sid, symbol, expr)
sid
The session ID.
symbol
The symbol name.
expr
The R expression to evaluate.
aggregate()
Evaluate an aggregate expression in a DataSHIELD session.
DSLiteServer$aggregate(sid, expr)
sid
The session ID.
expr
The R expression to evaluate.
clone()
The objects of this class are cloneable with this method.
DSLiteServer$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other server-side items:
newDSLiteServer()
Restore workspace from the data repository.
## S4 method for signature 'DSLiteConnection' dsRestoreWorkspace(conn, name)
## S4 method for signature 'DSLiteConnection' dsRestoreWorkspace(conn, name)
conn |
|
name |
Name of the workspace. |
Remoe a symbol living in the DataSHIELD R session.
## S4 method for signature 'DSLiteConnection' dsRmSymbol(conn, symbol)
## S4 method for signature 'DSLiteConnection' dsRmSymbol(conn, symbol)
conn |
|
symbol |
Name of the R symbol. |
Remove a workspace on the data repository.
## S4 method for signature 'DSLiteConnection' dsRmWorkspace(conn, name)
## S4 method for signature 'DSLiteConnection' dsRmWorkspace(conn, name)
conn |
|
name |
Name of the workspace. |
Save workspace on the data repository.
## S4 method for signature 'DSLiteConnection' dsSaveWorkspace(conn, name)
## S4 method for signature 'DSLiteConnection' dsSaveWorkspace(conn, name)
conn |
|
name |
Name of the workspace. |
AST node that reprsents a formula (such as NAME ~ terms).
DSLite::Node
-> FormulaNode
add_child()
Two children
FormulaNode$add_child(val)
val
Child Node
to_string()
Get the string representation of the BinaryOpNode
FormulaNode$to_string()
clone()
The objects of this class are cloneable with this method.
FormulaNode$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
BinaryOpNode
,
FunctionNode
,
GroupNode
,
Node
,
NumericNode
,
ParameterNode
,
RangeNode
,
StringNode
,
SymbolNode
,
UnaryOpNode
AST node that represents a function with its arguments.
DSLite::Node
-> FunctionNode
to_string()
Get the string representation of the FunctionNode
FunctionNode$to_string()
clone()
The objects of this class are cloneable with this method.
FunctionNode$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
BinaryOpNode
,
FormulaNode
,
GroupNode
,
Node
,
NumericNode
,
ParameterNode
,
RangeNode
,
StringNode
,
SymbolNode
,
UnaryOpNode
Get the data value corresponding to the variable with the symbol name from the DSLiteServer associated
to the DSConnection-class
object(s). Can be useful when developping a DataSHIELD package.
getDSLiteData(conns, symbol)
getDSLiteData(conns, symbol)
conns |
|
symbol |
Symbol name identifying the variable in the DSLiteServer's "server-side" environment(s). |
The data value or a list of values depending on the connections parameter. The value is NA when the connection object
is not of class DSLiteConnection-class
.
## Not run: # DataSHIELD login logindata <- setupCNSIMTest() conns <- datashield.login(logindata, assign=TRUE) # retrieve symbol D value from each DataSHIELD connections getDSLiteData(conns, "D") # retrieve symbol D value from a specific DataSHIELD connection getDSLiteData(conns$sim1, "D") ## End(Not run)
## Not run: # DataSHIELD login logindata <- setupCNSIMTest() conns <- datashield.login(logindata, assign=TRUE) # retrieve symbol D value from each DataSHIELD connections getDSLiteData(conns, "D") # retrieve symbol D value from a specific DataSHIELD connection getDSLiteData(conns$sim1, "D") ## End(Not run)
AST node that reprsents a group of tokens enclosed by parenthesis.
DSLite::Node
-> GroupNode
to_string()
Get the string representation of the GroupNode
GroupNode$to_string()
clone()
The objects of this class are cloneable with this method.
GroupNode$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
BinaryOpNode
,
FormulaNode
,
FunctionNode
,
Node
,
NumericNode
,
ParameterNode
,
RangeNode
,
StringNode
,
SymbolNode
,
UnaryOpNode
DataSHIELD login data.frame for connecting with CNSIM datasets. The CNSIM datasets contain synthetic data based on a model derived from the participants of the 1958 Birth Cohort, as part of the obesity methodological development project. These datasets do contain some NA values.
Field | Description | Type | Note |
server | Server/study name | char | |
url | Server/study URL | char | DSLiteServer instance symbol name |
user | User name | char | Always empty for DSLiteServer |
password | User password | char | Always empty for DSLiteServer |
table | Table unique name | char | As registered in the DSLiteServer |
options | Connection options | char | Always empty for DSLiteServer |
driver | Connection driver | char | DSLiteServer |
DataSHIELD login data.frame for connecting with DASIM datasets. The DASIM datasets contain synthetic data based on a model derived from the participants of the 1958 Birth Cohort, as part of the obesity methodological development project. These datasets do not contain some NA values.
Field | Description | Type | Note |
server | Server/study name | char | |
url | Server/study URL | char | DSLiteServer instance symbol name |
user | User name | char | Always empty for DSLiteServer |
password | User password | char | Always empty for DSLiteServer |
table | Table unique name | char | As registered in the DSLiteServer |
options | Connection options | char | Always empty for DSLiteServer |
driver | Connection driver | char | DSLiteServer |
DataSHIELD login data.frame for connecting with DISCORDANT datasets which purpose is to test datasets that are NOT harmonized.
Field | Description | Type | Note |
server | Server/study name | char | |
url | Server/study URL | char | DSLiteServer instance symbol name |
user | User name | char | Always empty for DSLiteServer |
password | User password | char | Always empty for DSLiteServer |
table | Table unique name | char | As registered in the DSLiteServer |
options | Connection options | char | Always empty for DSLiteServer |
driver | Connection driver | char | DSLiteServer |
DataSHIELD login data.frame for connecting with SURVIVAL datasets which purpose is to perform survival tests. The datasets contain synthetic data based on a simulated survival model, including a censoring indicator.
Field | Description | Type | Note |
server | Server/study name | char | |
url | Server/study URL | char | DSLiteServer instance symbol name |
user | User name | char | Always empty for DSLiteServer |
password | User password | char | Always empty for DSLiteServer |
table | Table unique name | char | As registered in the DSLiteServer |
options | Connection options | char | Always empty for DSLiteServer |
driver | Connection driver | char | DSLiteServer |
DataSHIELD login data.frame for connecting with TESTING.DATASET datasets which purpose is to evaluate each base data types.
Field | Description | Type | Note |
server | Server/study name | char | |
url | Server/study URL | char | DSLiteServer instance symbol name |
user | User name | char | Always empty for DSLiteServer |
password | User password | char | Always empty for DSLiteServer |
table | Table unique name | char | As registered in the DSLiteServer |
options | Connection options | char | Always empty for DSLiteServer |
driver | Connection driver | char | DSLiteServer |
Shortcut function to create a new DSLiteServer
instance.
newDSLiteServer( tables = list(), resources = list(), config = DSLite::defaultDSConfiguration(), strict = TRUE, home = file.path(tempdir(), ".dslite") )
newDSLiteServer( tables = list(), resources = list(), config = DSLite::defaultDSConfiguration(), strict = TRUE, home = file.path(tempdir(), ".dslite") )
tables |
A named list of data.frames representing the harmonized tables. |
resources |
A named list of |
config |
The DataSHIELD configuration. Default is to discover it from the DataSHIELD server-side R packages. 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). |
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. Default is in a hidden folder of the R session's temporary directory. |
Other server-side items:
DSLiteServer
Abstract Syntaxic Tree (AST) node that will be created by the DSLite R parser.
name
Token value
parent
Parent Node
children
Children Nodes
new()
Simple node constructor
Node$new(name = NA, parent = NA)
name
Token value
parent
Parent Node
A Node object
set_parent()
Set parent Node
Node$set_parent(val)
val
Parent Node
add_child()
Add a child Node
Node$add_child(val)
val
Child Node
to_string()
The string representation of the Node
Node$to_string()
to_string_children()
Get the string representation of the Node's children
Node$to_string_children()
accept()
Accept visitor
Node$accept(visitor)
visitor
Node visitor object
clone()
The objects of this class are cloneable with this method.
Node$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
BinaryOpNode
,
FormulaNode
,
FunctionNode
,
GroupNode
,
NumericNode
,
ParameterNode
,
RangeNode
,
StringNode
,
SymbolNode
,
UnaryOpNode
AST node that reprsents a numeric (integer or float) value.
DSLite::Node
-> NumericNode
add_child()
No children
NumericNode$add_child(val)
val
Child Node
to_string()
Get the string representation of the NumericNode
NumericNode$to_string()
clone()
The objects of this class are cloneable with this method.
NumericNode$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
BinaryOpNode
,
FormulaNode
,
FunctionNode
,
GroupNode
,
Node
,
ParameterNode
,
RangeNode
,
StringNode
,
SymbolNode
,
UnaryOpNode
AST node that represents a function's named parameter (such as NAME = expression).
DSLite::Node
-> ParameterNode
add_child()
Two children
ParameterNode$add_child(val)
val
Child Node
to_string()
Get the string representation of the BinaryOpNode
ParameterNode$to_string()
clone()
The objects of this class are cloneable with this method.
ParameterNode$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
BinaryOpNode
,
FormulaNode
,
FunctionNode
,
GroupNode
,
Node
,
NumericNode
,
RangeNode
,
StringNode
,
SymbolNode
,
UnaryOpNode
AST node that represents a range of values (such as min expression:max expression), therefore having two child nodes.
DSLite::Node
-> RangeNode
add_child()
Two children
RangeNode$add_child(val)
val
Child Node
to_string()
Get the string representation of the BinaryOpNode
RangeNode$to_string()
clone()
The objects of this class are cloneable with this method.
RangeNode$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
BinaryOpNode
,
FormulaNode
,
FunctionNode
,
GroupNode
,
Node
,
NumericNode
,
ParameterNode
,
StringNode
,
SymbolNode
,
UnaryOpNode
Load the CNSIM datasets, the corresponding login data object, instanciate a new DSLiteServer hosting these datasets and verify that the required DataSHIELD server-side packages are installed.
setupCNSIMTest(packages = c(), env = parent.frame())
setupCNSIMTest(packages = c(), env = parent.frame())
packages |
DataSHIELD server-side packages which local installation must be verified so that the DSLiteServer can auto-configure itself and can execute the DataSHIELD operations. Default is none. |
env |
The environment where DataSHIELD objects should be looked for: the DSLiteServer and the DSIConnection objects. Default is the Global environment. |
The login data for the datashield.login function.
Other setup functions:
setupDASIMTest()
,
setupDATASETTest()
,
setupDISCORDANTTest()
,
setupDSLiteServer()
,
setupSURVIVALTest()
## Not run: logindata <- setupCNSIMTest() conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
## Not run: logindata <- setupCNSIMTest() conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
Load the DASIM datasets, the corresponding login data object, instanciate a new DSLiteServer hosting these datasets and verify that the required DataSHIELD server-side packages are installed.
setupDASIMTest(packages = c(), env = parent.frame())
setupDASIMTest(packages = c(), env = parent.frame())
packages |
DataSHIELD server-side packages which local installation must be verified so that the DSLiteServer can auto-configure itself and can execute the DataSHIELD operations. Default is none. |
env |
The environment where DataSHIELD objects should be looked for: the DSLiteServer and the DSIConnection objects. Default is the Global environment. |
The login data for the datashield.login function.
Other setup functions:
setupCNSIMTest()
,
setupDATASETTest()
,
setupDISCORDANTTest()
,
setupDSLiteServer()
,
setupSURVIVALTest()
## Not run: logindata <- setupDASIMTest() conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
## Not run: logindata <- setupDASIMTest() conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
Load the TESTING.DATASET datasets, the corresponding login data object, instanciate a new DSLiteServer hosting these datasets and verify that the required DataSHIELD server-side packages are installed.
setupDATASETTest(packages = c(), env = parent.frame())
setupDATASETTest(packages = c(), env = parent.frame())
packages |
DataSHIELD server-side packages which local installation must be verified so that the DSLiteServer can auto-configure itself and can execute the DataSHIELD operations. Default is none. |
env |
The environment where DataSHIELD objects should be looked for: the DSLiteServer and the DSIConnection objects. Default is the Global environment. |
The login data for the datashield.login function.
Other setup functions:
setupCNSIMTest()
,
setupDASIMTest()
,
setupDISCORDANTTest()
,
setupDSLiteServer()
,
setupSURVIVALTest()
## Not run: logindata <- setupDATASETTest() conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
## Not run: logindata <- setupDATASETTest() conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
Load the DISCORDANT datasets, the corresponding login data object, instanciate a new DSLiteServer hosting these datasets and verify that the required DataSHIELD server-side packages are installed.
setupDISCORDANTTest(packages = c(), env = parent.frame())
setupDISCORDANTTest(packages = c(), env = parent.frame())
packages |
DataSHIELD server-side packages which local installation must be verified so that the DSLiteServer can auto-configure itself and can execute the DataSHIELD operations. Default is none. |
env |
The environment where DataSHIELD objects should be looked for: the DSLiteServer and the DSIConnection objects. Default is the Global environment. |
The login data for the datashield.login function.
Other setup functions:
setupCNSIMTest()
,
setupDASIMTest()
,
setupDATASETTest()
,
setupDSLiteServer()
,
setupSURVIVALTest()
## Not run: logindata <- setupDISCORDANTTest() conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
## Not run: logindata <- setupDISCORDANTTest() conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
Load the provided datasets and the corresponding logindata object, instanciate a new DSLiteServer hosting these datasets, verifies that the required DataSHIELD server-side packages are installed. All the data structures are loaded by data which supports various formats (see data() documentation).
setupDSLiteServer( packages = c(), datasets, logindata, pkgs = NULL, dslite.server = NULL, env = parent.frame() )
setupDSLiteServer( packages = c(), datasets, logindata, pkgs = NULL, dslite.server = NULL, env = parent.frame() )
packages |
DataSHIELD server-side packages which local installation must be verified so that the DSLiteServer can auto-configure itself and can execute the DataSHIELD operations. Default is none. |
datasets |
Names of the datasets to be loaded using data. |
logindata |
Name of the login data object to be loaded using data. |
pkgs |
The package(s) to look in for datasets, default is all, then the 'data' subdirectory (if present) of the current working directory (same behavior as 'package' argument in data). |
dslite.server |
Symbol name to which the DSLiteServer should be assigned to. If not provided, the symbol name will be the first not null one specified in the 'url' column of the loaded login data. |
env |
The environment where DataSHIELD objects should be looked for: the DSLiteServer and the DSIConnection objects. Default is the Global environment. |
The login data for the datashield.login function.
Other setup functions:
setupCNSIMTest()
,
setupDASIMTest()
,
setupDATASETTest()
,
setupDISCORDANTTest()
,
setupSURVIVALTest()
## Not run: logindata <- setupDSLiteServer( datasets = c("CNSIM1", "CNSIM2", "CNSIM3"), logindata = "logindata.dslite.cnsim", pkgs = "DSLite", dslite.server = "dslite.server") conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
## Not run: logindata <- setupDSLiteServer( datasets = c("CNSIM1", "CNSIM2", "CNSIM3"), logindata = "logindata.dslite.cnsim", pkgs = "DSLite", dslite.server = "dslite.server") conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
Load the SURVIVAL (EXPAND_WITH_MISSING) datasets, the corresponding login data object, instanciate a new DSLiteServer hosting these datasets and verify that the required DataSHIELD server-side packages are installed.
setupSURVIVALTest(packages = c(), env = parent.frame())
setupSURVIVALTest(packages = c(), env = parent.frame())
packages |
DataSHIELD server-side packages which local installation must be verified so that the DSLiteServer can auto-configure itself and can execute the DataSHIELD operations. Default is none. |
env |
The environment where DataSHIELD objects should be looked for: the DSLiteServer and the DSIConnection objects. Default is the Global environment. |
The login data for the datashield.login function.
Other setup functions:
setupCNSIMTest()
,
setupDASIMTest()
,
setupDATASETTest()
,
setupDISCORDANTTest()
,
setupDSLiteServer()
## Not run: logindata <- setupSURVIVALTest() conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
## Not run: logindata <- setupSURVIVALTest() conns <- datashield.login(logindata, assign=TRUE) # do DataSHIELD analysis datashield.logout(conns) ## End(Not run)
AST node that represent a string value, either single or double quoted.
DSLite::Node
-> StringNode
add_child()
No children
StringNode$add_child(val)
val
Child Node
to_string()
Get the string representation of the StringNode
StringNode$to_string()
clone()
The objects of this class are cloneable with this method.
StringNode$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
BinaryOpNode
,
FormulaNode
,
FunctionNode
,
GroupNode
,
Node
,
NumericNode
,
ParameterNode
,
RangeNode
,
SymbolNode
,
UnaryOpNode
Simulated dataset SURVIVAL.EXPAND_WITH_MISSING 1, in a data.frame with 2060 observations of 12 harmonized variables. The dataset contains synthetic data based on a simulated survival model, including a censoring indicator.
Variable | Description | Type | Note |
id | Unique individual ID | integer | |
study.id | Study ID | integer | |
time.id | Time ID | integer | |
starttime | Start of follow up | numeric | years |
endtime | End of follow up | numeric | years |
survtime | Survtime | numeric | years |
cens | Censoring status | factor | 0 = not censored, 1 = censored |
age.60 | Age centred at 60 | numeric | |
female | Gender | factor | 0 = Male, 1 = Female |
noise.56 | Noise pollution centred at 56 | numeric | dB |
pm10.16 | Particulate matter centred at 16 | numeric | µg/m3 |
bmi.26 | Body mass index centred at 26 | numeric | kg/m2 |
Simulated dataset SURVIVAL.EXPAND_WITH_MISSING 2, in a data.frame with 1640 observations of 12 harmonized variables. The dataset contains synthetic data based on a simulated survival model, including a censoring indicator.
Variable | Description | Type | Note |
id | Unique individual ID | integer | |
study.id | Study ID | integer | |
time.id | Time ID | integer | |
starttime | Start of follow up | numeric | years |
endtime | End of follow up | numeric | years |
survtime | Survtime | numeric | years |
cens | Censoring status | factor | 0 = not censored, 1 = censored |
age.60 | Age centred at 60 | numeric | |
female | Gender | factor | 0 = Male, 1 = Female |
noise.56 | Noise pollution centred at 56 | numeric | dB |
pm10.16 | Particulate matter centred at 16 | numeric | µg/m3 |
bmi.26 | Body mass index centred at 26 | numeric | kg/m2 |
Simulated dataset SURVIVAL.EXPAND_WITH_MISSING 3, in a data.frame with 2688 observations of 12 harmonized variables. The dataset contains synthetic data based on a simulated survival model, including a censoring indicator.
Variable | Description | Type | Note |
id | Unique individual ID | integer | |
study.id | Study ID | integer | |
time.id | Time ID | integer | |
starttime | Start of follow up | numeric | years |
endtime | End of follow up | numeric | years |
survtime | Survtime | numeric | years |
cens | Censoring status | factor | 0 = not censored, 1 = censored |
age.60 | Age centred at 60 | numeric | |
female | Gender | factor | 0 = Male, 1 = Female |
noise.56 | Noise pollution centred at 56 | numeric | dB |
pm10.16 | Particulate matter centred at 16 | numeric | µg/m3 |
bmi.26 | Body mass index centred at 26 | numeric | kg/m2 |
AST node that represents a R symbol (variable name, function name etc.).
DSLite::Node
-> SymbolNode
add_child()
No children
SymbolNode$add_child(val)
val
Child Node
to_string()
Get the string representation of the SymbolNode
SymbolNode$to_string()
clone()
The objects of this class are cloneable with this method.
SymbolNode$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
BinaryOpNode
,
FormulaNode
,
FunctionNode
,
GroupNode
,
Node
,
NumericNode
,
ParameterNode
,
RangeNode
,
StringNode
,
UnaryOpNode
Simulated dataset TESTING.DATASET 1, in a data.frame with 71 observations of 17 harmonized variables.
Variable | Description | Type |
ID | Dummy data | integer |
CHARACTER | Dummy data | char |
LOGICAL | Dummy data | logical |
NA_VALUES | Dummy data | logical |
NULL_VALUES | Dummy data | logical |
INTEGER | Dummy data | integer |
NON_NEGATIVE_INTEGER | Dummy data | integer |
POSITIVE_INTEGER | Dummy data | integer |
NEGATIVE_INTEGER | Dummy data | integer |
NUMERIC | Dummy data | numeric |
NON_NEGATIVE_NUMERIC | Dummy data | numeric |
POSITIVE_NUMERIC | Dummy data | numeric |
NEGATIVE_NUMERIC | Dummy data | numeric |
FACTOR_CHARACTER | Dummy data | factor |
FACTOR_INTEGER | Dummy data | factor |
IDENTIFIER | Dummy data | integer |
CATEGORY | Dummy data | integer |
Simulated dataset TESTING.DATASET 2, in a data.frame with 71 observations of 17 harmonized variables.
Variable | Description | Type |
ID | Dummy data | integer |
CHARACTER | Dummy data | char |
LOGICAL | Dummy data | logical |
NA_VALUES | Dummy data | logical |
NULL_VALUES | Dummy data | logical |
INTEGER | Dummy data | integer |
NON_NEGATIVE_INTEGER | Dummy data | integer |
POSITIVE_INTEGER | Dummy data | integer |
NEGATIVE_INTEGER | Dummy data | integer |
NUMERIC | Dummy data | numeric |
NON_NEGATIVE_NUMERIC | Dummy data | numeric |
POSITIVE_NUMERIC | Dummy data | numeric |
NEGATIVE_NUMERIC | Dummy data | numeric |
FACTOR_CHARACTER | Dummy data | factor |
FACTOR_INTEGER | Dummy data | factor |
IDENTIFIER | Dummy data | integer |
CATEGORY | Dummy data | integer |
Simulated dataset TESTING.DATASET 3, in a data.frame with 71 observations of 17 harmonized variables.
Variable | Description | Type |
ID | Dummy data | integer |
CHARACTER | Dummy data | char |
LOGICAL | Dummy data | logical |
NA_VALUES | Dummy data | logical |
NULL_VALUES | Dummy data | logical |
INTEGER | Dummy data | integer |
NON_NEGATIVE_INTEGER | Dummy data | integer |
POSITIVE_INTEGER | Dummy data | integer |
NEGATIVE_INTEGER | Dummy data | integer |
NUMERIC | Dummy data | numeric |
NON_NEGATIVE_NUMERIC | Dummy data | numeric |
POSITIVE_NUMERIC | Dummy data | numeric |
NEGATIVE_NUMERIC | Dummy data | numeric |
FACTOR_CHARACTER | Dummy data | factor |
FACTOR_INTEGER | Dummy data | factor |
IDENTIFIER | Dummy data | integer |
CATEGORY | Dummy data | integer |
Parse an expression according to DataSHIELD syntax rules and returns an Abstract Syntaxic Tree (AST) node.
testParse(expr, debug = FALSE)
testParse(expr, debug = FALSE)
expr |
Expression |
debug |
Parser debug logger activated |
An Abstract Syntaxic Tree node
## Not run: # a function call with a valid formula ast <- testParse("someregression(D$height ~ D$diameter + D$length)") # a function call with an invalid formula including a function call testParse("someregression(D$height ~ D$diameter + poly(D$length,3,raw=TRUE))") ## End(Not run)
## Not run: # a function call with a valid formula ast <- testParse("someregression(D$height ~ D$diameter + D$length)") # a function call with an invalid formula including a function call testParse("someregression(D$height ~ D$diameter + poly(D$length,3,raw=TRUE))") ## End(Not run)
AST node that represents a unary operator (such as '-'), therefore having a single child node.
DSLite::Node
-> UnaryOpNode
add_child()
One children
UnaryOpNode$add_child(val)
val
Child Node
to_string()
Get the string representation of the UnaryOpNode
UnaryOpNode$to_string()
clone()
The objects of this class are cloneable with this method.
UnaryOpNode$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other parser items:
BinaryOpNode
,
FormulaNode
,
FunctionNode
,
GroupNode
,
Node
,
NumericNode
,
ParameterNode
,
RangeNode
,
StringNode
,
SymbolNode