A CDISCTealDatasetConnector
class of objects
CDISCTealDatasetConnector.Rd
Objects of this class store the connection function to fetch a single dataset.
The difference compared to TealDatasetConnector
is a parent field that
indicates name of the parent dataset. Note that the parent field might
be empty (i.e. character(0)
).
Super class
teal.data::TealDatasetConnector
-> CDISCTealDatasetConnector
Methods
Inherited methods
teal.data::TealDatasetConnector$check()
teal.data::TealDatasetConnector$get_code()
teal.data::TealDatasetConnector$get_code_class()
teal.data::TealDatasetConnector$get_dataname()
teal.data::TealDatasetConnector$get_datanames()
teal.data::TealDatasetConnector$get_dataset()
teal.data::TealDatasetConnector$get_dataset_label()
teal.data::TealDatasetConnector$get_error_message()
teal.data::TealDatasetConnector$get_join_keys()
teal.data::TealDatasetConnector$get_keys()
teal.data::TealDatasetConnector$get_pull_args()
teal.data::TealDatasetConnector$get_pull_callable()
teal.data::TealDatasetConnector$get_raw_data()
teal.data::TealDatasetConnector$get_server()
teal.data::TealDatasetConnector$get_ui()
teal.data::TealDatasetConnector$get_var_r6()
teal.data::TealDatasetConnector$is_failed()
teal.data::TealDatasetConnector$is_mutate_delayed()
teal.data::TealDatasetConnector$is_pulled()
teal.data::TealDatasetConnector$launch()
teal.data::TealDatasetConnector$mutate()
teal.data::TealDatasetConnector$mutate_join_keys()
teal.data::TealDatasetConnector$print()
teal.data::TealDatasetConnector$reassign_datasets_vars()
teal.data::TealDatasetConnector$set_args()
teal.data::TealDatasetConnector$set_dataset_label()
teal.data::TealDatasetConnector$set_join_keys()
teal.data::TealDatasetConnector$set_keys()
teal.data::TealDatasetConnector$set_ui_input()
Method new()
Create a new TealDatasetConnector
object. Set the pulling function
CallableFunction
which returns a data.frame
, e.g. by reading
from a function or creating it on the fly.
Usage
CDISCTealDatasetConnector$new(
dataname,
pull_callable,
keys,
parent,
code = character(0),
label = character(0),
vars = list(),
metadata = NULL
)
Arguments
dataname
(
character
)
A given name for the dataset it may not contain spacespull_callable
(
CallableFunction
)
function with necessary arguments set to fetch data from connection.keys
(
character
)
vector of dataset primary keys column namesparent
optional, (
character
)
parent dataset namecode
(
character
)
A character string defining code to modifyraw_data
from this dataset. To modify current dataset code should contain at least one assignment to object defined indataname
argument. For example ifdataname = ADSL
example code should containADSL <- <some R code>
. Can't be used simultaneously withscript
label
(
character
)
Label to describe the dataset.vars
(named
list
))
In case when this object code depends on otherTealDataset
object(s) or other constant value, this/these object(s) should be included as named element(s) of the list. For example if this object code needsADSL
object we should specifyvars = list(ADSL = <adsl object>)
. It's recommended to includeTealDataset
orTealDatasetConnector
objects to thevars
list to preserve reproducibility. Please note thatvars
are included to this object as localvars
and they cannot be modified within another dataset.metadata
(named
list
,NULL
orCallableFunction
)
Field containing either the metadata about the dataset (each element of the list should be atomic and length one) or aCallableFuntion
to pull the metadata from a connection. This should return alist
or an object which can be converted to a list withas.list
.
Method pull()
Pull the data
Read or create the data using pull_callable
specified in the constructor.
Arguments
args
(
NULL
or namedlist
)
additional dynamic arguments for pull function.args
can be omitted ifpull_callable
from constructor already contains all necessary arguments to pull data. One can try to executepull_callable
directly byx$pull_callable$run()
or to get code usingx$pull_callable$get_code()
.args
specified in pull are used temporary to get data but not saved in code.try
(
logical
value)
whether perform function evaluation insidetry
clause