Skip to contents

[Experimental] Please note that the script has to end with a call creating desired object. The error will be raised otherwise.

Usage

cdisc_dataset_file(path, code = get_code(path))

Arguments

path

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

code

(character) reproducible code to re-create object

Value

(CDISCTealDataset) object

Examples

# simple example
file_example <- tempfile(fileext = ".R")
writeLines(
  text = c(
    "library(teal.data)
     library(scda)

     cdisc_dataset(dataname = \"ADSL\",
                   x = synthetic_cdisc_data('latest')$adsl,
                   code = \"library(scda)\nADSL <- synthetic_cdisc_data('latest')$adsl\")"
  ),
  con = file_example
)
x <- cdisc_dataset_file(file_example, code = character(0))
get_code(x)
#> [1] "library(scda)\nADSL <- synthetic_cdisc_data(\"latest\")$adsl"