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_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$print()teal.data::TealDatasetConnector$reassign_datasets_vars()teal.data::TealDatasetConnector$set_args()teal.data::TealDatasetConnector$set_dataset_label()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 namesparentoptional, (
character)
parent dataset namecode(
character)
A character string defining code to modifyraw_datafrom this dataset. To modify current dataset code should contain at least one assignment to object defined indatanameargument. For example ifdataname = ADSLexample code should containADSL <- <some R code>. Can't be used simultaneously withscriptlabel(
character)
Label to describe the dataset.vars(named
list))
In case when this object code depends on otherTealDatasetobject(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 needsADSLobject we should specifyvars = list(ADSL = <adsl object>). It's recommended to includeTealDatasetorTealDatasetConnectorobjects to thevarslist to preserve reproducibility. Please note thatvarsare included to this object as localvarsand they cannot be modified within another dataset.metadata(named
list,NULLorCallableFunction)
Field containing either the metadata about the dataset (each element of the list should be atomic and length one) or aCallableFuntionto pull the metadata from a connection. This should return alistor 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(
NULLor namedlist)
additional dynamic arguments for pull function.argscan be omitted ifpull_callablefrom constructor already contains all necessary arguments to pull data. One can try to executepull_callabledirectly byx$pull_callable$run()or to get code usingx$pull_callable$get_code().argsspecified in pull are used temporary to get data but not saved in code.try(
logicalvalue)
whether perform function evaluation insidetryclause