Source {cohortBuilder} | R Documentation |
R6 class representing a data source
R6 class representing a data source
Source is an object storing information about data source such as source type, primary keys and relations between stored data.
dtconn
Data connection object the Source if based on.
description
Source object description list.
attributes
Extra source parameters passed when source is defined.
options
Extra configuration options.
binding_keys
Source data relations expressed as binding-keys.
primary_keys
Source data primary keys expressed as primary_keys.
source_code
An expression which allows to recreate basic source structure.
new()
Create a new 'Source' object.
Source$new( dtconn, ..., primary_keys = NULL, binding_keys = NULL, source_code = NULL, description = NULL, options = list(display_binding = TRUE) )
dtconn
An object defining source data connection.
...
Extra Source parameters. Stored within 'attributes' field.
primary_keys
Definition of data 'primary_keys', if appropriate. See primary_keys.
binding_keys
Definition of relations between data, if appropriate. See binding-keys.
source_code
A quote object that allows to recreate basic source structure. Used as a part of reproducible code output, see code.
description
A named list storing the source objects description. Can be accessed with description Cohort method.
options
List of options affecting methods output. Currently supported only 'display_binding' specifying whether reproducible code should include bindings definition.
A new 'Source' object of class 'Source' (and 'dtconn' object class appended).
get()
Get selected 'Source' object 'attribute'.
Source$get(param)
param
Name of the attribute.
get_steps()
Returns filtering steps definition, if defined for 'Source'.
Source$get_steps()
add_step()
Add filtering step definition.
Source$add_step(step)
step
Step definition created with step.
rm_step()
Remove filtering step definition.
Source$rm_step(step_id)
step_id
Id of the step to be removed.
add_filter()
Add filter definition to selected step.
Source$add_filter(filter, step_id)
filter
Filter definition created with filter.
step_id
Id of the step to include the filter to. If skipped the last step is used.
rm_filter()
Remove filter definition from selected step.
Source$rm_filter(step_id, filter_id)
step_id
Id of the step where filter is defined.
filter_id
Id of the filter to be removed.
update_filter()
Update filter definition.
Source$update_filter(step_id, filter_id, ...)
step_id
Id of the step where filter is defined.
filter_id
Id of the filter to be updated.
...
Parameters with its new values.
clone()
The objects of this class are cloneable with this method.
Source$clone(deep = FALSE)
deep
Whether to make a deep clone.