Load TealDatasetConnector
object from a file
dataset_connector_file.Rd
Details
Please note that the script has to end with a call creating desired object. The error will be raised otherwise.
Please note that the script has to end with a call creating desired object. The error will be raised otherwise.
Examples
# simple example
file_example <- tempfile(fileext = ".R")
writeLines(
text = c(
"library(teal.data)
library(scda)
pull_callable <- callable_function(function() {synthetic_cdisc_data('latest')$adsl})
dataset_connector(\"ADSL\", pull_callable, get_cdisc_keys(\"ADSL\"))"
),
con = file_example
)
x <- dataset_connector_file(file_example)
get_code(x)
#> [1] "ADSL <- (function() {\n synthetic_cdisc_data(\"latest\")$adsl\n})()"
# simple example
file_example <- tempfile(fileext = ".R")
writeLines(
text = c(
"library(teal.data)
library(scda)
pull_callable <- callable_function(function() {synthetic_cdisc_data('latest')$adsl})
cdisc_dataset_connector(\"ADSL\", pull_callable, get_cdisc_keys(\"ADSL\"))"
),
con = file_example
)
x <- cdisc_dataset_connector_file(file_example)
get_code(x)
#> [1] "ADSL <- (function() {\n synthetic_cdisc_data(\"latest\")$adsl\n})()"