This package is used to create the data needed for teal
applications. This data can be:
MultiAssayExperiment
objectsThis package provides:
install.packages('teal.data')
Alternatively, you might want to use the development version.
# install.packages("pak")
::pak("insightsengineering/teal.data") pak
To understand how to use this package, please refer to the Introduction
to teal.data
article, which provides multiple examples
of code implementation.
Below is the showcase of the example usage.
library(teal.data)
# quick start for clinical trial data
<- cdisc_data(
my_data ADSL = example_cdisc_data("ADSL"),
ADTTE = example_cdisc_data("ADTTE"),
code = quote({
<- example_cdisc_data("ADSL")
ADSL <- example_cdisc_data("ADTTE")
ADTTE
})
)
# or
<- within(teal_data(), {
my_data <- example_cdisc_data("ADSL")
ADSL <- example_cdisc_data("ADTTE")
ADTTE
})<- c("ADSL", "ADTTE")
datanames datanames(my_data) <- datanames
join_keys(my_data) <- default_cdisc_join_keys[datanames]
# quick start for general data
<- within(teal_data(), {
my_general_data <- iris
iris <- mtcars
mtcars })
# reproducibility check
<- teal_data(iris = iris, code = "iris <- mtcars")
data verify(data)
#> Error: Code verification failed.
#> Object(s) recreated with code that have different structure in data:
#> β’ iris
# code extraction
<- within(teal_data(), {iris2 <- iris[1:6, ]})
iris2_data get_code(iris2_data)
#> "iris2 <- iris[1:6, ]"
If you encounter a bug or have a feature request, please file an
issue. For questions, discussions, and staying up to date, please use
the teal
channel in the pharmaverse
slack
workspace.