Skip to content

e-kotov/rdocdump

rdocdump: Dump ‘R’ Package Source, Documentation, and Vignettes into One File rdocdump website

Project Status: Active Lifecycle: experimental CRAN status CRAN/METACRAN Total downloads CRAN/METACRAN Downloads per month R-CMD-check pkgcheck

DOI DOI

Dump source code, documentation and vignettes of an R package into a single file. Supports installed packages, tar.gz archives, and package source directories. If the package is not installed, only its source is automatically downloaded from CRAN for processing. The output is a single plain text file or a character vector, which is useful to ingest complete package documentation and source into a large language model (LLM) or pass it further to other tools, such as {ragnar} to create a Retrieval-Augmented Generation (RAG) workflow.

Installation

Install the latest stable release of rdocdump from CRAN with:

install.packages("rdocdump")

You can install the development version of rdocdump from R Universe with:

install.packages('rdocdump',
 repos = c('https://e-kotov.r-universe.dev', 'https://cloud.r-project.org')
)

or from GitHub with:

# install.packages("pak")
pak::pak("e-kotov/rdocdump")

Example

Extract documenation and source code of {rJavaEnv} package by downloading source from CRAN and save it to file rJavaEnv_docs.txt

rdd_to_txt(
  pkg = "rJavaEnv",
  file = tempfile("rJavaEnv_docs_", fileext = ".txt"),
  force_fetch = TRUE, # force download even if package is installed
  keep_files = "none" # delete temp files
)

Citation

To cite package ‘rdocdump’ in publications use:

Kotov E (2025). rdocdump: Dump R Package Source, Documentation, and Vignettes into One File. doi:10.32614/CRAN.package.rdocdump https://doi.org/10.32614/CRAN.package.rdocdump, https://github.com/e-kotov/rdocdump.

BibTeX:

@Manual{rdocdump,
  title = {rdocdump: Dump R Package Source, Documentation, and Vignettes into One File},
  author = {Egor Kotov},
  year = {2025},
  url = {https://github.com/e-kotov/rdocdump},
  doi = {10.32614/CRAN.package.rdocdump},
}

About

rdocdump: Dump ‘R’ Package Source, Documentation, and Vignettes into One File

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages