Data Model for 'teal' Applications

Provides a 'teal_data' class as a unified data model for 'teal' applications focusing on reproducibility and relational data.


teal.data

CRAN Version Total Downloads Last Month Downloads Last Week Downloads

Check 🛠 Docs 📚 Code Coverage 📔

GitHub forks GitHub repo stars

GitHub commit activity GitHub contributors GitHub last commit GitHub pull requests GitHub repo size GitHub language count Project Status: Active – The project has reached a stable, usable state and is being actively developed. Current Version Open Issues

This package is used to create the data needed for teal applications. This data can be:

  • Independent data frames
  • CDISC data (for clinical trial reporting)
  • Relational data
  • MultiAssayExperiment objects

This package provides:

  • the mechanism for pulling data from existing systems
  • the ability to mutate (i.e. pre-process) the data
  • record the operations used to create the data to enable reproducibility

Installation

install.packages('teal.data')

Alternatively, you might want to use the development version.

# install.packages("pak")
pak::pak("insightsengineering/teal.data")

Usage

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
my_data <- cdisc_data(
  ADSL = example_cdisc_data("ADSL"),
  ADTTE = example_cdisc_data("ADTTE"),
  code = quote({
    ADSL <- example_cdisc_data("ADSL")
    ADTTE <- example_cdisc_data("ADTTE")
  })
)

# or

my_data <- within(teal_data(), {
  ADSL <- example_cdisc_data("ADSL")
  ADTTE <- example_cdisc_data("ADTTE")
})
datanames <- c("ADSL", "ADTTE")
datanames(my_data) <- datanames
join_keys(my_data) <- default_cdisc_join_keys[datanames]
# quick start for general data
my_general_data <- within(teal_data(), {
  iris <- iris
  mtcars <- mtcars
})
# reproducibility check
data <- teal_data(iris = iris, code = "iris <- mtcars")
verify(data)
#> Error: Code verification failed.
#>  Object(s) recreated with code that have different structure in data:
#>  • iris

# code extraction
iris2_data <- within(teal_data(), {iris2 <- iris[1:6, ]})
get_code(iris2_data)
#> "iris2 <- iris[1:6, ]"

Getting help

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.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("teal.data")

0.8.1 by Dony Unardi, 4 months ago


https://insightsengineering.github.io/teal.data/, https://github.com/insightsengineering/teal.data/


Report a bug at https://github.com/insightsengineering/teal.data/issues


Browse source code at https://github.com/cran/teal.data


Authors: Dawid Kaledkowski [aut] (ORCID: , Aleksander Chlebowski [aut] (ORCID: , Marcin Kosinski [aut] , Andre Verissimo [aut] , Pawel Rucki [aut] , Mahmoud Hallal [aut] , Nikolas Burkoff [aut] , Maciej Nasinski [aut] , Konrad Pagacz [aut] , Junlue Zhao [aut] , Chendi Liao [rev] , Dony Unardi [rev, cre] , F. Hoffmann-La Roche AG [cph, fnd]


Documentation:   PDF Manual  


Apache License 2.0 license


Imports checkmate, lifecycle, methods, rlang, stats, utils

Depends on teal.code

Suggests knitr, random.cdisc.data, rmarkdown, testthat, withr


Imported by teal.modules.clinical, teal.modules.general, teal.picks, teal.reporter, teal.slice, teal.transform.

Depended on by teal.

Suggested by uteals.


See at CRAN