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