Skip to contents

[Stable]

[Stable]

Usage

dataset_connector_file(path)

cdisc_dataset_connector_file(path)

Arguments

path

(character) string giving the pathname of the file to read from.

Value

TealDatasetConnector object

CDISCTealDatasetConnector object

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})()"