Mutate data by code
mutate_data.Rd
Code used in this mutation is not linked to particular
but refers to all datasets.
Consequence of this is that when using
get_code(<dataset>) this
part of the code will be returned for each dataset specified. This method
should be used only if particular call involve changing multiple datasets.
Otherwise please use mutate_dataset.
Execution of the code is delayed after datasets are pulled
(isTRUE(is_pulled)).
Arguments
- x
(
TealDataAbstract)
object.- code
(
character)
Code to mutate the dataset. Must contain thedataset$dataname. Or can also be an object of classPythonCodeClassreturned bypython_code.- script
(
character)
file that contains R Code that can be read usingread_script. Preferred beforecodeargument.- 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.