diff --git a/.Rbuildignore b/.Rbuildignore
index 4366c01a2..9e769033c 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -46,3 +46,4 @@ coverage.*
^.revdeprefs\.yaml$
^revdep$
^\.covrignore$
+^README\.Rmd$
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
index 8fdf0ae0f..645865e7b 100644
--- a/.github/workflows/docs.yaml
+++ b/.github/workflows/docs.yaml
@@ -34,8 +34,38 @@ on:
workflow_dispatch:
jobs:
+ README:
+ runs-on: ubuntu-latest
+ env:
+ GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+ permissions:
+ contents: write
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v4.1.1
+ with:
+ fetch-depth: 0
+
+ - uses: r-lib/actions/setup-pandoc@v2
+
+ - uses: r-lib/actions/setup-r@v2
+
+ - uses: r-lib/actions/setup-r-dependencies@v2
+
+ - name: Render Rmarkdown files ๐น
+ run: |
+ RMD_PATH=($(git diff --name-only ${{ github.event.before }} ${{ github.sha }} *.Rmd))
+ Rscript -e 'for (f in commandArgs(TRUE)) if (file.exists(f)) rmarkdown::render(f)' ${RMD_PATH[*]}
+
+ - name: Commit results โฌ๏ธ
+ run: |
+ git config --local user.name "$GITHUB_ACTOR"
+ git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
+ git commit ${RMD_PATH[*]/.Rmd/.md} -m 'Re-build Rmarkdown files' || echo "No changes to commit"
+ git push origin || echo "No changes to commit"
docs:
name: Pkgdown Docs ๐
+ needs: README
uses: insightsengineering/r.pkg.template/.github/workflows/pkgdown.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 210305584..aad638d78 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -8,6 +8,8 @@ repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.3.9003
hooks:
+ - id: readme-rmd-rendered
+ name: Render README.md
- id: style-files
name: Style code with `styler`
args:
diff --git a/README.Rmd b/README.Rmd
new file mode 100644
index 000000000..c8ff44456
--- /dev/null
+++ b/README.Rmd
@@ -0,0 +1,170 @@
+---
+output: github_document
+---
+
+
+
+```{r, include = FALSE}
+knitr::opts_chunk$set(
+ collapse = TRUE,
+ comment = "#>",
+ fig.path = "man/figures/README-",
+ out.width = "100%"
+)
+```
+
+# `teal`: Interactive Exploratory Data Analysis with `Shiny` Web-Applications
+
+
+[](https://cran.r-project.org/package=teal)
+[](https://cran.r-project.org/package=teal)
+[](https://cran.r-project.org/package=teal)
+[](https://cran.r-project.org/package=teal)
+
+[](https://insightsengineering.github.io/teal/main/unit-test-report/)
+[](https://insightsengineering.github.io/teal/)
+[](https://insightsengineering.github.io/teal/main/coverage-report/)
+
+
+
+
+
+
+
+
+
+
+[](https://www.repostatus.org/#active)
+[](https://github.com/insightsengineering/teal/tree/main)
+[](https://github.com/insightsengineering/teal/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
+
+
+`teal` is a `shiny`-based interactive exploration framework for analyzing data. `teal` applications require app developers to specify:
+
+
+- Data, which can be:
+ - CDISC data, commonly used for clinical trial reporting
+ - Independent datasets, for example from a `data.frame`
+ - Related datasets, for example a set of `data.frames` with key columns to enable data joins
+ - `MultiAssayExperiment` objects which are `R` data structures for representing and analyzing multi-omics experiments
+- `teal` modules:
+ - `teal modules` are `shiny` modules built within the `teal` framework that specify analysis to be performed. For example, it can be a module for exploring outliers in the data, or a module for visualizing the data in line plots. Although these can be created from scratch, many `teal` modules have been released and we recommend starting with modules found in the following packages:
+ - [`teal.modules.general`](https://insightsengineering.github.io/teal.modules.general/latest-tag/): general modules for exploring relational/independent/CDISC data
+ - [`teal.modules.clinical`](https://insightsengineering.github.io/teal.modules.clinical/latest-tag/): modules specific to CDISC data and clinical trial reporting
+ - [`teal.modules.hermes`](https://insightsengineering.github.io/teal.modules.hermes/latest-tag/): modules for analyzing `MultiAssayExperiment` objects
+
+
+
+A lot of the functionality of the `teal` framework derives from the following packages:
+
+
+- [`teal.data`](https://insightsengineering.github.io/teal.data/latest-tag/): creating and loading the data needed for `teal` applications.
+- [`teal.widgets`](https://insightsengineering.github.io/teal.widgets/latest-tag/): `shiny` components used within `teal`.
+- [`teal.slice`](https://insightsengineering.github.io/teal.slice/latest-tag/): provides a filtering panel to allow filtering of data.
+- [`teal.code`](https://insightsengineering.github.io/teal.code/latest-tag/): handles reproducibility of outputs.
+- [`teal.logger`](https://insightsengineering.github.io/teal.logger/latest-tag/): standardizes logging within `teal` framework.
+- [`teal.reporter`](https://insightsengineering.github.io/teal.reporter/latest-tag/): allows `teal` applications to generate reports.
+
+Dive deeper into `teal` with our comprehensive video guide.
+Please click the image below to start learning:
+
+[](https://www.youtube.com/watch?v=N8ZamECICSI)
+
+
+
+## Installation
+
+```{r, eval=FALSE}
+install.packages("teal")
+```
+
+Alternatively, you might also use the development version.
+
+```{r, eval=FALSE}
+# install.packages("pak")
+pak::pak("insightsengineering/teal")
+```
+
+## Usage
+
+```{r teal, eval=FALSE}
+library(teal)
+
+app <- init(
+ data = teal_data(iris = iris),
+ modules = list(
+ module(
+ label = "iris histogram",
+ server = function(input, output, session, data) {
+ updateSelectInput(
+ session = session,
+ inputId = "var",
+ choices = names(data()[["iris"]])[1:4]
+ )
+
+ output$hist <- renderPlot({
+ req(input$var)
+ hist(x = data()[["iris"]][[input$var]])
+ })
+ },
+ ui = function(id) {
+ ns <- NS(id)
+ list(
+ selectInput(
+ inputId = ns("var"),
+ label = "Column name",
+ choices = NULL
+ ),
+ plotOutput(outputId = ns("hist"))
+ )
+ }
+ )
+ )
+)
+
+shinyApp(app$ui, app$server)
+```
+
+
+
+
+## Try it out in Shinylive
+
+```{r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive", quietly = TRUE)}
+code <- paste0(c(
+ knitr::knit_code$get("teal")
+), collapse = "\n")
+
+url <- roxy.shinylive::create_shinylive_url(code)
+cat(sprintf("[Open in Shinylive](%s)\n\n", url))
+```
+
+```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = requireNamespace("roxy.shinylive", quietly = TRUE) && knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")}
+knitr::include_url(url, height = "800px")
+```
+
+Please see [`teal.gallery`](https://insightsengineering.github.io/teal.gallery/) and [TLG Catalog](https://insightsengineering.github.io/tlg-catalog/) to see examples of `teal` apps.
+
+Please start with the ["Technical Blueprint" article](https://insightsengineering.github.io/teal/latest-tag/articles/blueprint/index.html), ["Getting Started" article](https://insightsengineering.github.io/teal/latest-tag/articles/getting-started-with-teal.html), and then other [package vignettes](https://insightsengineering.github.io/teal/latest-tag/articles/index.html) for more detailed guide.
+
+## Getting help
+
+If you encounter a bug or have a feature request, please file an issue. For questions, discussions, and updates, use the `teal` channel in the [`pharmaverse` slack workspace](https://pharmaverse.slack.com).
+
+## Acknowledgment
+
+This package is a result of a joint efforts by many developers and stakeholders. We would like to thank everyone who contributed so far!
+
+## Stargazers and Forkers
+
+### Stargazers over time
+
+[](https://starchart.cc/insightsengineering/teal)
+
+### Stargazers
+
+[](https://github.com/insightsengineering/teal/stargazers)
+
+### Forkers
+
+[](https://github.com/insightsengineering/teal/network/members)
diff --git a/README.md b/README.md
index f4f3c0e06..729058e82 100644
--- a/README.md
+++ b/README.md
@@ -1,78 +1,122 @@
+
+
+
# `teal`: Interactive Exploratory Data Analysis with `Shiny` Web-Applications
-[](https://cran.r-project.org/package=teal)
-[](https://cran.r-project.org/package=teal)
-[](https://cran.r-project.org/package=teal)
-[](https://cran.r-project.org/package=teal)
-
-[](https://insightsengineering.github.io/teal/main/unit-test-report/)
-[](https://insightsengineering.github.io/teal/)
-[](https://insightsengineering.github.io/teal/main/coverage-report/)
-
-
-
-
-
-
-
-
-
-
-[](https://www.repostatus.org/#active)
-[](https://github.com/insightsengineering/teal/tree/main)
-[](https://github.com/insightsengineering/teal/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
+
+[](https://cran.r-project.org/package=teal)
+[](https://cran.r-project.org/package=teal)
+[](https://cran.r-project.org/package=teal)
+[](https://cran.r-project.org/package=teal)
+
+[](https://insightsengineering.github.io/teal/main/unit-test-report/)
+[](https://insightsengineering.github.io/teal/)
+[](https://insightsengineering.github.io/teal/main/coverage-report/)
+
+
+
+
+
+
+
+
+
+
+[](https://www.repostatus.org/#active)
+[](https://github.com/insightsengineering/teal/tree/main)
+[](https://github.com/insightsengineering/teal/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
-`teal` is a `shiny`-based interactive exploration framework for analyzing data. `teal` applications require app developers to specify:
+`teal` is a `shiny`-based interactive exploration framework for
+analyzing data. `teal` applications require app developers to specify:
-- Data, which can be:
- - CDISC data, commonly used for clinical trial reporting
- - Independent datasets, for example from a `data.frame`
- - Related datasets, for example a set of `data.frames` with key columns to enable data joins
- - `MultiAssayExperiment` objects which are `R` data structures for representing and analyzing multi-omics experiments
-- `teal` modules:
- - `teal modules` are `shiny` modules built within the `teal` framework that specify analysis to be performed. For example, it can be a module for exploring outliers in the data, or a module for visualizing the data in line plots. Although these can be created from scratch, many `teal` modules have been released and we recommend starting with modules found in the following packages:
- - [`teal.modules.general`](https://insightsengineering.github.io/teal.modules.general/latest-tag/): general modules for exploring relational/independent/CDISC data
- - [`teal.modules.clinical`](https://insightsengineering.github.io/teal.modules.clinical/latest-tag/): modules specific to CDISC data and clinical trial reporting
- - [`teal.modules.hermes`](https://insightsengineering.github.io/teal.modules.hermes/latest-tag/): modules for analyzing `MultiAssayExperiment` objects
+
+- Data, which can be:
+ - CDISC data, commonly used for clinical trial reporting
+ - Independent datasets, for example from a `data.frame`
+ - Related datasets, for example a set of `data.frames` with key
+ columns to enable data joins
+ - `MultiAssayExperiment` objects which are `R` data structures for
+ representing and analyzing multi-omics experiments
+- `teal` modules:
+ - `teal modules` are `shiny` modules built within the `teal` framework
+ that specify analysis to be performed. For example, it can be a
+ module for exploring outliers in the data, or a module for
+ visualizing the data in line plots. Although these can be created
+ from scratch, many `teal` modules have been released and we
+ recommend starting with modules found in the following packages:
+ - [`teal.modules.general`](https://insightsengineering.github.io/teal.modules.general/latest-tag/):
+ general modules for exploring relational/independent/CDISC data
+ - [`teal.modules.clinical`](https://insightsengineering.github.io/teal.modules.clinical/latest-tag/):
+ modules specific to CDISC data and clinical trial reporting
+ - [`teal.modules.hermes`](https://insightsengineering.github.io/teal.modules.hermes/latest-tag/):
+ modules for analyzing `MultiAssayExperiment` objects
-A lot of the functionality of the `teal` framework derives from the following packages:
+A lot of the functionality of the `teal` framework derives from the
+following packages:
-- [`teal.data`](https://insightsengineering.github.io/teal.data/latest-tag/): creating and loading the data needed for `teal` applications.
-- [`teal.widgets`](https://insightsengineering.github.io/teal.widgets/latest-tag/): `shiny` components used within `teal`.
-- [`teal.slice`](https://insightsengineering.github.io/teal.slice/latest-tag/): provides a filtering panel to allow filtering of data.
-- [`teal.code`](https://insightsengineering.github.io/teal.code/latest-tag/): handles reproducibility of outputs.
-- [`teal.logger`](https://insightsengineering.github.io/teal.logger/latest-tag/): standardizes logging within `teal` framework.
-- [`teal.reporter`](https://insightsengineering.github.io/teal.reporter/latest-tag/): allows `teal` applications to generate reports.
-Dive deeper into `teal` with our comprehensive video guide.
-Please click the image below to start learning:
-
-[](https://www.youtube.com/watch?v=N8ZamECICSI)
+- [`teal.data`](https://insightsengineering.github.io/teal.data/latest-tag/):
+ creating and loading the data needed for `teal` applications.
+- [`teal.widgets`](https://insightsengineering.github.io/teal.widgets/latest-tag/):
+ `shiny` components used within `teal`.
+- [`teal.slice`](https://insightsengineering.github.io/teal.slice/latest-tag/):
+ provides a filtering panel to allow filtering of data.
+- [`teal.code`](https://insightsengineering.github.io/teal.code/latest-tag/):
+ handles reproducibility of outputs.
+- [`teal.logger`](https://insightsengineering.github.io/teal.logger/latest-tag/):
+ standardizes logging within `teal` framework.
+- [`teal.reporter`](https://insightsengineering.github.io/teal.reporter/latest-tag/):
+ allows `teal` applications to generate reports.
+
+Dive deeper into `teal` with our comprehensive video guide. Please click
+the image below to start learning:
+
+[](https://www.youtube.com/watch?v=N8ZamECICSI)
## Installation
-```r
+``` r
install.packages("teal")
```
Alternatively, you might also use the development version.
-```r
+``` r
# install.packages("pak")
pak::pak("insightsengineering/teal")
```
## Usage
-```r
+``` r
library(teal)
app <- init(
@@ -106,30 +150,53 @@ app <- init(
shinyApp(app$ui, app$server)
```
-
+
+
+App recording
+
+
+## Try it out in Shinylive
+
+[Open in
+Shinylive](https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKcqagSgB0IAtKgAEAHgC0I2hFql2AkSIAmUUlBEBeEV2oB9Veva1GtAM5bppsz1yKRMIsoCu1OBe10z8+0scu3BQglEJFqKHo4aks+MBNzEQALc1IiAHNmGFi7YNCRMzhGADdCywAzZwgCUloSYwhUZ1JcESImxub89zNaiBbDKB4REF8851RDOABlKLhqgEkGpvYCsx6SS1X1vtG8vf3QmQ755UsRWKKWbN2D29CCRKJaAndLaHgzdgH2HmBgWPiZliAF1gb8AIyIAAsYIENyUbVIHQAJMlvOIpIwKMpCgAFahEeQjXIHLEAR3qKMujH4JP2aPkAA9LN9fv84tYQcC-kcmsjqaDaQcAL5CvLCnJ7Zy0cqVaq9YzKIbEg4QCySEQAOSmirFey8PjpewKbgWS3kvNIJzenwuVzAtnhdzy4Ui0W05zAAGEiNRnDBgu84Ncjc69g8ni8PFqAKoAGTjjtDoVQBNIAHl2stEcdTto1QowAzYjw9Xky0phaMxbTaQIzMkIKwAILodjCZHSlodgrFQo8MDC4FAA)
-Please see [`teal.gallery`](https://insightsengineering.github.io/teal.gallery/) and [TLG Catalog](https://insightsengineering.github.io/tlg-catalog/) to see examples of `teal` apps.
+Please see
+[`teal.gallery`](https://insightsengineering.github.io/teal.gallery/)
+and [TLG Catalog](https://insightsengineering.github.io/tlg-catalog/) to
+see examples of `teal` apps.
-Please start with the ["Technical Blueprint" article](https://insightsengineering.github.io/teal/latest-tag/articles/blueprint/index.html), ["Getting Started" article](https://insightsengineering.github.io/teal/latest-tag/articles/getting-started-with-teal.html), and then other [package vignettes](https://insightsengineering.github.io/teal/latest-tag/articles/index.html) for more detailed guide.
+Please start with the [โTechnical Blueprintโ
+article](https://insightsengineering.github.io/teal/latest-tag/articles/blueprint/index.html),
+[โGetting Startedโ
+article](https://insightsengineering.github.io/teal/latest-tag/articles/getting-started-with-teal.html),
+and then other [package
+vignettes](https://insightsengineering.github.io/teal/latest-tag/articles/index.html)
+for more detailed guide.
## Getting help
-If you encounter a bug or have a feature request, please file an issue. For questions, discussions, and updates, use the `teal` channel in the [`pharmaverse` slack workspace](https://pharmaverse.slack.com).
+If you encounter a bug or have a feature request, please file an issue.
+For questions, discussions, and updates, use the `teal` channel in the
+[`pharmaverse` slack workspace](https://pharmaverse.slack.com).
## Acknowledgment
-This package is a result of a joint efforts by many developers and stakeholders. We would like to thank everyone who contributed so far!
+This package is a result of a joint efforts by many developers and
+stakeholders. We would like to thank everyone who contributed so far!
## Stargazers and Forkers
### Stargazers over time
-[](https://starchart.cc/insightsengineering/teal)
+[](https://starchart.cc/insightsengineering/teal)
### Stargazers
-[](https://github.com/insightsengineering/teal/stargazers)
+[](https://github.com/insightsengineering/teal/stargazers)
### Forkers
-[](https://github.com/insightsengineering/teal/network/members)
+[](https://github.com/insightsengineering/teal/network/members)