vignettes/Deconvolution_Benchmark_DLPFC.Rmd
Deconvolution_Benchmark_DLPFC.Rmd
#Introduction
Inferring the composition of different cell types in a bulk RNA-seq data
Deconvolution is a analysis that aims to calculate the proportion of different cell types that make up a sample of bulk RNA-seq, based off of cell type gene expression profiles in a single cell/nuclei RNA-seq dataset.
Approach | Method | Citation | Availability |
---|---|---|---|
weighted least squares | DWLS | Tsoucas et al, Nature Comm, 2019 | R Package Cran |
Bias correction: Assay | Bisque | Jew et al, Nature Comm, 2020 | R Package github |
Bias correction: Sourse | MuSiC | Wang et al, Nature Communications, 2019 | R Package github |
Machine Learning | CIBERSORTx | Newman et al., Nature BioTech, 2019 | Webtool |
Bayesian | BayesPrism | Chu et al., Nature Cancer, 2022 | Webtool/R Package |
linear | Hspe | Hunt et al., Ann. Appl. Stat, 2021 | R package github |
We will be demonstrating how to use DeconvoBuddies
tools
when applying deconvolution with the Bisque
package.
DeconvoBuddies
toolsBisqueRNA
DeconvoBuddies
toolsR
is an open-source statistical environment which can be
easily modified to enhance its functionality via packages. DeconvoBuddies
is a R
package available via the Bioconductor repository for packages.
R
can be installed on any operating system from CRAN after which you can install
DeconvoBuddies
by using the following commands in your R
session:
DeconvoBuddies
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("DeconvoBuddies")
## Check that you have a valid Bioconductor installation
BiocManager::valid()
## install Bisque from cran
# install.packages("BisqueRNA")
library("spatialLIBD")
library("DeconvoBuddies")
library("SummarizedExperiment")
library("SingleCellExperiment")
library("BisqueRNA")
library("dplyr")
library("tidyr")
library("tibble")
Access the 110 sample Human DLPFC bulk RNA-seq dataset for LIBD.
These samples
are from 19 tissue blocks, and 10 neurotypical adult donors. Samples
were sequenced with two different library_types
(polyA and
RiboZeroGold), and three different RNA_extraction
(Cyto,
Total, Nuc), post quality control n=110 samples.
## use fetch deconvon data to load rse_gene
rse_gene <- fetch_deconvo_data("rse_gene")
#> 2024-05-02 22:23:12.350492 loading file /github/home/.cache/R/BiocFileCache/2343769e391_rse_gene.Rdata%3Frlkey%3Dsw2djr71y954yw4o3xrmjv59b%26dl%3D1
rse_gene
#> class: RangedSummarizedExperiment
#> dim: 21745 110
#> metadata(1): SPEAQeasy_settings
#> assays(2): counts logcounts
#> rownames(21745): ENSG00000227232.5 ENSG00000278267.1 ...
#> ENSG00000210195.2 ENSG00000210196.2
#> rowData names(11): Length gencodeID ... gencodeTx passExprsCut
#> colnames(110): 2107UNHS-0291_Br2720_Mid_Bulk
#> 2107UNHS-0291_Br2720_Mid_Cyto ... AN00000906_Br8667_Mid_Cyto
#> AN00000906_Br8667_Mid_Nuc
#> colData names(78): SAMPLE_ID Sample ... diagnosis qc_class
# lobstr::obj_size(rse_gene)
# 41.16 MB
## bulk RNA seq samples were sequenced with different library types, and RNA extractions
table(rse_gene$library_type, rse_gene$library_prep)
#>
#> Bulk Cyto Nuc
#> polyA 19 18 18
#> RiboZeroGold 19 19 17
This data is paired with a single nucleus RNA-seq data set from
spatialLIBD
. This dataset can be accessed with
spatialLIBD::fetch_data()
.
## Use spatialLIBD to fetch the snRNA-seq dataset
sce_path_zip <- fetch_deconvo_data("sce")
#> 2024-05-02 22:23:14.468243 loading file /github/home/.cache/R/BiocFileCache/23443ff239b_sce_DLPFC_annotated.zip%3Fdl%3D1
sce_path <- unzip(sce_path_zip, exdir = tempdir())
sce <- HDF5Array::loadHDF5SummarizedExperiment(
file.path(tempdir(), "sce_DLPFC_annotated"))
# lobstr::obj_size(sce)
# 172.28 MB
## Check the broad cell type distribution
table(sce$cellType_broad_hc)
#>
#> Astro EndoMural Micro Oligo OPC Excit Inhib Ambiguous
#> 3979 2157 1601 10894 1940 24809 11067 21157
## We're going to subset to the first 1k genes to save memory
sce <- sce[seq_len(1000),]
DeconvoBuddies::get_mean_ratio
marker_stats <- get_mean_ratio(sce,
cellType_col = "cellType_broad_hc",
gene_ensembl = "gene_id",
gene_name = "gene_name")
marker_stats |> group_by(cellType.target) |> slice(1)
#> # A tibble: 8 × 10
#> # Groups: cellType.target [8]
#> gene cellType.target mean.target cellType.2nd mean.2nd MeanRatio
#> <chr> <fct> <dbl> <fct> <dbl> <dbl>
#> 1 PRDM16 Astro 1.97 EndoMural 0.142 13.9
#> 2 SLC2A1 EndoMural 1.49 Ambiguous 0.183 8.14
#> 3 LINC01141 Micro 1.57 Excit 0.0640 24.5
#> 4 RNF220 Oligo 4.48 EndoMural 1.32 3.40
#> 5 CSMD2 OPC 2.82 Excit 1.33 2.11
#> 6 RAP1GAP Excit 0.983 Ambiguous 0.506 1.94
#> 7 SCMH1 Inhib 2.04 OPC 1.43 1.43
#> 8 CAMK2N1 Ambiguous 3.16 Excit 2.25 1.40
#> # ℹ 4 more variables: MeanRatio.rank <int>, MeanRatio.anno <chr>,
#> # gene_ensembl <chr>, gene_name <chr>
The DeconvoBuddies package (Huuki-Myers, Maynard, Hicks, Zandi, Kleinman, Hyde, Goes, and Collado-Torres, 2024) was made possible thanks to:
This package was developed using biocthis.
Code for creating the vignette
## Create the vignette
library("rmarkdown")
system.time(render("Deconvolution_Benchmark_DLPFC.Rmd", "BiocStyle::html_document"))
## Extract the R code
library("knitr")
knit("Deconvolution_Benchmark_DLPFC.Rmd", tangle = TRUE)
Date the vignette was generated.
#> [1] "2024-05-02 22:23:34 UTC"
Wallclock time spent generating the vignette.
#> Time difference of 34.535 secs
R
session information.
#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.3.3 (2024-02-29)
#> os Ubuntu 22.04.4 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz UTC
#> date 2024-05-02
#> pandoc 3.1.1 @ /usr/local/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> abind 1.4-5 2016-07-21 [1] RSPM (R 4.3.0)
#> AnnotationDbi 1.64.1 2023-11-03 [1] Bioconductor
#> AnnotationHub 3.10.1 2024-04-05 [1] Bioconductor 3.18 (R 4.3.2)
#> attempt 0.3.1 2020-05-03 [1] RSPM (R 4.3.0)
#> backports 1.4.1 2021-12-13 [1] RSPM (R 4.3.0)
#> beachmat 2.18.1 2024-02-14 [1] Bioconductor 3.18 (R 4.3.2)
#> beeswarm 0.4.0 2021-06-01 [1] RSPM (R 4.3.0)
#> benchmarkme 1.0.8 2022-06-12 [1] RSPM (R 4.3.0)
#> benchmarkmeData 1.0.4 2020-04-23 [1] RSPM (R 4.3.0)
#> bibtex 0.5.1 2023-01-26 [1] RSPM (R 4.3.0)
#> Biobase * 2.62.0 2023-10-24 [1] Bioconductor
#> BiocFileCache 2.10.2 2024-03-27 [1] Bioconductor 3.18 (R 4.3.2)
#> BiocGenerics * 0.48.1 2023-11-01 [1] Bioconductor
#> BiocIO 1.12.0 2023-10-24 [1] Bioconductor
#> BiocManager 1.30.22 2023-08-08 [2] CRAN (R 4.3.3)
#> BiocNeighbors 1.20.2 2024-01-07 [1] Bioconductor 3.18 (R 4.3.2)
#> BiocParallel 1.36.0 2023-10-24 [1] Bioconductor
#> BiocSingular 1.18.0 2023-10-24 [1] Bioconductor
#> BiocStyle * 2.30.0 2023-10-24 [1] Bioconductor
#> BiocVersion 3.18.1 2023-11-15 [2] Bioconductor
#> Biostrings 2.70.3 2024-03-13 [1] Bioconductor 3.18 (R 4.3.2)
#> BisqueRNA * 1.0.5 2021-05-23 [1] RSPM (R 4.3.2)
#> bit 4.0.5 2022-11-15 [1] RSPM (R 4.3.0)
#> bit64 4.0.5 2020-08-30 [1] RSPM (R 4.3.0)
#> bitops 1.0-7 2021-04-24 [1] RSPM (R 4.3.0)
#> blob 1.2.4 2023-03-17 [1] RSPM (R 4.3.0)
#> bluster 1.12.0 2023-10-24 [1] Bioconductor
#> bookdown 0.39 2024-04-15 [1] RSPM (R 4.3.0)
#> bslib 0.7.0 2024-03-29 [2] RSPM (R 4.3.0)
#> cachem 1.0.8 2023-05-01 [2] RSPM (R 4.3.0)
#> cli 3.6.2 2023-12-11 [2] RSPM (R 4.3.0)
#> cluster 2.1.6 2023-12-01 [3] CRAN (R 4.3.3)
#> codetools 0.2-20 2024-03-31 [3] RSPM (R 4.3.0)
#> colorspace 2.1-0 2023-01-23 [1] RSPM (R 4.3.0)
#> config 0.3.2 2023-08-30 [1] RSPM (R 4.3.0)
#> cowplot 1.1.3 2024-01-22 [1] RSPM (R 4.3.0)
#> crayon 1.5.2 2022-09-29 [2] RSPM (R 4.3.0)
#> curl 5.2.1 2024-03-01 [2] RSPM (R 4.3.0)
#> data.table 1.15.4 2024-03-30 [1] RSPM (R 4.3.0)
#> DBI 1.2.2 2024-02-16 [1] RSPM (R 4.3.0)
#> dbplyr 2.5.0 2024-03-19 [1] RSPM (R 4.3.0)
#> DeconvoBuddies * 0.99.0 2024-05-02 [1] Bioconductor
#> DelayedArray 0.28.0 2023-10-24 [1] Bioconductor
#> DelayedMatrixStats 1.24.0 2023-10-24 [1] Bioconductor
#> desc 1.4.3 2023-12-10 [2] RSPM (R 4.3.0)
#> digest 0.6.35 2024-03-11 [2] RSPM (R 4.3.0)
#> doParallel 1.0.17 2022-02-07 [1] RSPM (R 4.3.0)
#> dotCall64 1.1-1 2023-11-28 [1] RSPM (R 4.3.0)
#> dplyr * 1.1.4 2023-11-17 [1] RSPM (R 4.3.0)
#> dqrng 0.3.2 2023-11-29 [1] RSPM (R 4.3.0)
#> DT 0.33 2024-04-04 [1] RSPM (R 4.3.0)
#> edgeR 4.0.16 2024-02-18 [1] Bioconductor 3.18 (R 4.3.2)
#> evaluate 0.23 2023-11-01 [2] RSPM (R 4.3.0)
#> ExperimentHub 2.10.0 2023-10-24 [1] Bioconductor
#> fansi 1.0.6 2023-12-08 [2] RSPM (R 4.3.0)
#> fastmap 1.1.1 2023-02-24 [2] RSPM (R 4.3.0)
#> fields 15.2 2023-08-17 [1] RSPM (R 4.3.0)
#> filelock 1.0.3 2023-12-11 [1] RSPM (R 4.3.0)
#> foreach 1.5.2 2022-02-02 [1] RSPM (R 4.3.0)
#> fs 1.6.4 2024-04-25 [2] RSPM (R 4.3.0)
#> generics 0.1.3 2022-07-05 [1] RSPM (R 4.3.0)
#> GenomeInfoDb * 1.38.8 2024-03-15 [1] Bioconductor 3.18 (R 4.3.2)
#> GenomeInfoDbData 1.2.11 2024-04-06 [1] Bioconductor
#> GenomicAlignments 1.38.2 2024-01-16 [1] Bioconductor 3.18 (R 4.3.2)
#> GenomicRanges * 1.54.1 2023-10-29 [1] Bioconductor
#> ggbeeswarm 0.7.2 2023-04-29 [1] RSPM (R 4.3.0)
#> ggplot2 3.5.1 2024-04-23 [1] RSPM (R 4.3.0)
#> ggrepel 0.9.5 2024-01-10 [1] RSPM (R 4.3.0)
#> glue 1.7.0 2024-01-09 [2] RSPM (R 4.3.0)
#> golem 0.4.1 2023-06-05 [1] RSPM (R 4.3.0)
#> gridExtra 2.3 2017-09-09 [1] RSPM (R 4.3.0)
#> gtable 0.3.5 2024-04-22 [1] RSPM (R 4.3.0)
#> HDF5Array 1.30.1 2024-02-14 [1] Bioconductor 3.18 (R 4.3.2)
#> htmltools 0.5.8.1 2024-04-04 [2] RSPM (R 4.3.0)
#> htmlwidgets 1.6.4 2023-12-06 [2] RSPM (R 4.3.0)
#> httpuv 1.6.15 2024-03-26 [2] RSPM (R 4.3.0)
#> httr 1.4.7 2023-08-15 [2] RSPM (R 4.3.0)
#> igraph 2.0.3 2024-03-13 [1] RSPM (R 4.3.0)
#> interactiveDisplayBase 1.40.0 2023-10-24 [1] Bioconductor
#> IRanges * 2.36.0 2023-10-24 [1] Bioconductor
#> irlba 2.3.5.1 2022-10-03 [1] RSPM (R 4.3.0)
#> iterators 1.0.14 2022-02-05 [1] RSPM (R 4.3.0)
#> jquerylib 0.1.4 2021-04-26 [2] RSPM (R 4.3.0)
#> jsonlite 1.8.8 2023-12-04 [2] RSPM (R 4.3.0)
#> KEGGREST 1.42.0 2023-10-24 [1] Bioconductor
#> knitr 1.46 2024-04-06 [2] RSPM (R 4.3.0)
#> later 1.3.2 2023-12-06 [2] RSPM (R 4.3.0)
#> lattice 0.22-6 2024-03-20 [3] RSPM (R 4.3.0)
#> lazyeval 0.2.2 2019-03-15 [1] RSPM (R 4.3.0)
#> lifecycle 1.0.4 2023-11-07 [2] RSPM (R 4.3.0)
#> limma 3.58.1 2023-10-31 [1] Bioconductor
#> locfit 1.5-9.9 2024-03-01 [1] RSPM (R 4.3.0)
#> lubridate 1.9.3 2023-09-27 [1] RSPM (R 4.3.0)
#> magick 2.8.3 2024-02-18 [1] RSPM (R 4.3.0)
#> magrittr 2.0.3 2022-03-30 [2] RSPM (R 4.3.0)
#> maps 3.4.2 2023-12-15 [1] RSPM (R 4.3.0)
#> Matrix 1.6-5 2024-01-11 [3] CRAN (R 4.3.3)
#> MatrixGenerics * 1.14.0 2023-10-24 [1] Bioconductor
#> matrixStats * 1.3.0 2024-04-11 [1] RSPM (R 4.3.0)
#> memoise 2.0.1 2021-11-26 [2] RSPM (R 4.3.0)
#> metapod 1.10.1 2023-12-24 [1] Bioconductor 3.18 (R 4.3.2)
#> mime 0.12 2021-09-28 [2] RSPM (R 4.3.0)
#> munsell 0.5.1 2024-04-01 [1] RSPM (R 4.3.0)
#> paletteer 1.6.0 2024-01-21 [1] RSPM (R 4.3.0)
#> pillar 1.9.0 2023-03-22 [2] RSPM (R 4.3.0)
#> pkgconfig 2.0.3 2019-09-22 [2] RSPM (R 4.3.0)
#> pkgdown 2.0.9 2024-04-18 [2] RSPM (R 4.3.0)
#> plotly 4.10.4 2024-01-13 [1] RSPM (R 4.3.0)
#> plyr 1.8.9 2023-10-02 [1] RSPM (R 4.3.0)
#> png 0.1-8 2022-11-29 [1] RSPM (R 4.3.0)
#> promises 1.3.0 2024-04-05 [2] RSPM (R 4.3.0)
#> purrr 1.0.2 2023-08-10 [2] RSPM (R 4.3.0)
#> R6 2.5.1 2021-08-19 [2] RSPM (R 4.3.0)
#> rafalib 1.0.0 2015-08-09 [1] RSPM (R 4.3.0)
#> ragg 1.3.0 2024-03-13 [2] RSPM (R 4.3.0)
#> rappdirs 0.3.3 2021-01-31 [2] RSPM (R 4.3.0)
#> RColorBrewer 1.1-3 2022-04-03 [1] RSPM (R 4.3.0)
#> Rcpp 1.0.12 2024-01-09 [2] RSPM (R 4.3.0)
#> RCurl 1.98-1.14 2024-01-09 [1] RSPM (R 4.3.0)
#> RefManageR * 1.4.0 2022-09-30 [1] RSPM (R 4.3.0)
#> rematch2 2.1.2 2020-05-01 [2] RSPM (R 4.3.0)
#> restfulr 0.0.15 2022-06-16 [1] RSPM (R 4.3.2)
#> rhdf5 2.46.1 2023-11-29 [1] Bioconductor 3.18 (R 4.3.2)
#> rhdf5filters 1.14.1 2023-11-06 [1] Bioconductor
#> Rhdf5lib 1.24.2 2024-02-07 [1] Bioconductor 3.18 (R 4.3.2)
#> rjson 0.2.21 2022-01-09 [1] RSPM (R 4.3.0)
#> rlang 1.1.3 2024-01-10 [2] RSPM (R 4.3.0)
#> rmarkdown 2.26 2024-03-05 [2] RSPM (R 4.3.0)
#> Rsamtools 2.18.0 2023-10-24 [1] Bioconductor
#> RSQLite 2.3.6 2024-03-31 [1] RSPM (R 4.3.0)
#> rsvd 1.0.5 2021-04-16 [1] RSPM (R 4.3.0)
#> rtracklayer 1.62.0 2023-10-24 [1] Bioconductor
#> S4Arrays 1.2.1 2024-03-04 [1] Bioconductor 3.18 (R 4.3.2)
#> S4Vectors * 0.40.2 2023-11-23 [1] Bioconductor 3.18 (R 4.3.2)
#> sass 0.4.9 2024-03-15 [2] RSPM (R 4.3.0)
#> ScaledMatrix 1.10.0 2023-10-24 [1] Bioconductor
#> scales 1.3.0 2023-11-28 [1] RSPM (R 4.3.0)
#> scater 1.30.1 2023-11-16 [1] Bioconductor
#> scran 1.30.2 2024-01-22 [1] Bioconductor 3.18 (R 4.3.2)
#> scuttle 1.12.0 2023-10-24 [1] Bioconductor
#> sessioninfo * 1.2.2 2021-12-06 [2] RSPM (R 4.3.0)
#> shiny 1.8.1.1 2024-04-02 [2] RSPM (R 4.3.0)
#> shinyWidgets 0.8.6 2024-04-24 [1] RSPM (R 4.3.0)
#> SingleCellExperiment * 1.24.0 2023-10-24 [1] Bioconductor
#> spam 2.10-0 2023-10-23 [1] RSPM (R 4.3.0)
#> SparseArray 1.2.4 2024-02-11 [1] Bioconductor 3.18 (R 4.3.2)
#> sparseMatrixStats 1.14.0 2023-10-24 [1] Bioconductor
#> SpatialExperiment * 1.12.0 2023-10-24 [1] Bioconductor
#> spatialLIBD * 1.14.1 2023-11-30 [1] Bioconductor 3.18 (R 4.3.2)
#> statmod 1.5.0 2023-01-06 [1] RSPM (R 4.3.0)
#> stringi 1.8.3 2023-12-11 [2] RSPM (R 4.3.0)
#> stringr 1.5.1 2023-11-14 [2] RSPM (R 4.3.0)
#> SummarizedExperiment * 1.32.0 2023-10-24 [1] Bioconductor
#> systemfonts 1.0.6 2024-03-07 [2] RSPM (R 4.3.0)
#> textshaping 0.3.7 2023-10-09 [2] RSPM (R 4.3.0)
#> tibble * 3.2.1 2023-03-20 [2] RSPM (R 4.3.0)
#> tidyr * 1.3.1 2024-01-24 [1] RSPM (R 4.3.0)
#> tidyselect 1.2.1 2024-03-11 [1] RSPM (R 4.3.0)
#> timechange 0.3.0 2024-01-18 [1] RSPM (R 4.3.0)
#> utf8 1.2.4 2023-10-22 [2] RSPM (R 4.3.0)
#> vctrs 0.6.5 2023-12-01 [2] RSPM (R 4.3.0)
#> vipor 0.4.7 2023-12-18 [1] RSPM (R 4.3.0)
#> viridis 0.6.5 2024-01-29 [1] RSPM (R 4.3.0)
#> viridisLite 0.4.2 2023-05-02 [1] RSPM (R 4.3.0)
#> withr 3.0.0 2024-01-16 [2] RSPM (R 4.3.0)
#> xfun 0.43 2024-03-25 [2] RSPM (R 4.3.0)
#> XML 3.99-0.16.1 2024-01-22 [1] RSPM (R 4.3.0)
#> xml2 1.3.6 2023-12-04 [2] RSPM (R 4.3.0)
#> xtable 1.8-4 2019-04-21 [2] RSPM (R 4.3.0)
#> XVector 0.42.0 2023-10-24 [1] Bioconductor
#> yaml 2.3.8 2023-12-11 [2] RSPM (R 4.3.0)
#> zlibbioc 1.48.2 2024-03-13 [1] Bioconductor 3.18 (R 4.3.2)
#>
#> [1] /__w/_temp/Library
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/local/lib/R/library
#>
#> ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
This vignette was generated using BiocStyle (Oleś, 2023) with knitr (Xie, 2024) and rmarkdown (Allaire, Xie, Dervieux et al., 2024) running behind the scenes.
Citations made with RefManageR (McLean, 2017).
[1] J. Allaire, Y. Xie, C. Dervieux, et al. rmarkdown: Dynamic Documents for R. R package version 2.26. 2024. URL: https://github.com/rstudio/rmarkdown.
[2] L. A. Huuki-Myers, K. R. Maynard, S. C. Hicks, et al. DeconvoBuddies: a R/Bioconductor package with deconvolution helper functions. https://github.com/LieberInstitute/DeconvoBuddies/DeconvoBuddies - R package version 0.99.0. 2024. DOI: 10.18129/B9.bioc.DeconvoBuddies. URL: http://www.bioconductor.org/packages/DeconvoBuddies.
[3] M. W. McLean. “RefManageR: Import and Manage BibTeX and BibLaTeX References in R”. In: The Journal of Open Source Software (2017). DOI: 10.21105/joss.00338.
[4] A. Oleś. BiocStyle: Standard styles for vignettes and other Bioconductor documents. R package version 2.30.0. 2023. DOI: 10.18129/B9.bioc.BiocStyle. URL: https://bioconductor.org/packages/BiocStyle.
[5] R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing. Vienna, Austria, 2024. URL: https://www.R-project.org/.
[6] H. Wickham. “testthat: Get Started with Testing”. In: The R Journal 3 (2011), pp. 5–10. URL: https://journal.r-project.org/archive/2011-1/RJournal_2011-1_Wickham.pdf.
[7] H. Wickham, W. Chang, R. Flight, et al. sessioninfo: R Session Information. R package version 1.2.2, https://r-lib.github.io/sessioninfo/. 2021. URL: https://github.com/r-lib/sessioninfo#readme.
[8] Y. Xie. knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.46. 2024. URL: https://yihui.org/knitr/.