{"id":13857650,"url":"https://github.com/reconverse/reportfactory","last_synced_at":"2025-10-22T04:43:46.284Z","repository":{"id":48060805,"uuid":"137204865","full_name":"reconverse/reportfactory","owner":"reconverse","description":"Lightweight infrastructure to handle multiple rmarkdown reports","archived":false,"fork":false,"pushed_at":"2022-12-12T13:38:51.000Z","size":1292,"stargazers_count":83,"open_issues_count":9,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-17T13:09:39.814Z","etag":null,"topics":["infrastructure","knitr","r","r-package","r-packages","rmarkdown","rmarkdown-document"],"latest_commit_sha":null,"homepage":"https://www.reconverse.org/reportfactory/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reconverse.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-13T11:13:28.000Z","updated_at":"2024-08-25T16:08:41.000Z","dependencies_parsed_at":"2023-01-27T20:15:51.952Z","dependency_job_id":null,"html_url":"https://github.com/reconverse/reportfactory","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconverse%2Freportfactory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconverse%2Freportfactory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconverse%2Freportfactory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconverse%2Freportfactory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reconverse","download_url":"https://codeload.github.com/reconverse/reportfactory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225920425,"owners_count":17545492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["infrastructure","knitr","r","r-package","r-packages","rmarkdown","rmarkdown-document"],"created_at":"2024-08-05T03:01:43.116Z","updated_at":"2025-10-22T04:43:41.238Z","avatar_url":"https://github.com/reconverse.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r readmesetup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n\u003c!-- badges: start --\u003e\n[![Codecov test coverage](https://codecov.io/gh/reconverse/reportfactory/branch/master/graph/badge.svg)](https://codecov.io/gh/reconverse/reportfactory?branch=master)\n[![R-CMD-check](https://github.com/reconverse/reportfactory/workflows/R-CMD-check/badge.svg)](https://github.com/reconverse/reportfactory/actions)\n\u003c!-- badges: end --\u003e\n\n# Welcome to reportfactory!\n\n\u003cbr\u003e\n**\u003cspan style=\"color: red;\"\u003eNOTE\u003c/span\u003e**\n\nThis version of {reportfactory} works in a very different way to the previous\nunreleased version.  For those already using {reportfactory} in their pipelines\nyou can obtain the old version using the {remotes} package:\n\n```{r installold, eval = FALSE}\nremotes::install_github(\"reconverse/reportfactory@old_version\")\n``` \n\nYou can also download it directly from\nhttps://github.com/reconverse/reportfactory/releases/tag/old_version.\n\nYou can install the current version of the package from \n[CRAN](https://cran.r-project.org/) with:\n\n```{r, eval=FALSE}\ninstall.packages(\"reportfactory\")\n```\n\nThe development version can be installed from [GitHub](https://github.com/) with:\n\n```{r, eval=FALSE}\nif (!require(remotes)) {\n  install.packages(\"remotes\")\n}\nremotes::install_github(\"reconverse/reportfactory\", build_vignettes = TRUE)\n```\n\n## reportfactory in a nutshell \n\n{reportfactory} is a R package which facilitates workflows for handling multiple\n`.Rmd` reports, compiling one or several reports in one go, and storing outputs\nin well-organised, timestamped folders. This is illustrated in the figure below:\n\n\u003cbr\u003e\n\u003cimg src=\"https://github.com/reconverse/reportfactory/raw/master/artwork/workflow.png\" width=\"100%\" alt=\"workflow\"\u003e\n\u003cbr\u003e\n\nThere a few key principles it adheres to:\n\n- *Simple*: only focusses on the compilation of reports with minimum overhead\n   for the user.\n\n- *Non-invasive*: `.Rmd` documents need no alteration to work within the factory.\n\n- *Reproducible*: time-stamped folder structure and customisable subfolders make\n  viewing the same report over time a breeze; handling of package dependencies\n  facilitates the deployment of factories on multiple computers.\n\n- *Time-saving*: easy compilation of multiple reports using regular expressions;\n  book-keeping is handled by the factory and ensures that: i) every report is\n  compiled in a clean environment and ii) all outputs are stored in a dedicated\n  folder\n\n\n\n## Installing the package\n\nTo install the development version of the package, use:\n\n```{r install2, eval = FALSE}\nremotes::install_github(\"reconverse/reportfactory\")\n```\n\n\n\n## Quick start\n\n### Step 1 - Create a new factory\nCreate and open a new factory. Here, we create the factory with the default settings.\nThis will create the factory in our current working directory and then move us in to this new factory.\n\n\n```{r creation}\nlibrary(reportfactory)\nnew_factory(\"my_factory\")\n```\n\n```{r, setwd, include=FALSE}\nknitr::opts_knit$set(root.dir = file.path(getwd(), \"my_factory\"))\n```\n\n### Step 2 - Add your reports\nHere we've already created some with most of the default arguments being set to\nTRUE (the default). These default settings include both an example report and\nsome associated data (`report_sources/example_report.Rmd` and \n`data/raw/example_data.csv`).  The helper functions below show the state of the\nfactory.\n\n```{r listing}\nlist_reports()       # list all available report sources\nlist_deps()          # list all of the dependencies of the reports\nlist_outputs()       # currently empty\n```\n\n### Step 3 - Compile report(s)\n\nThe `compile_reports()` function can be used to compile a report using regular\nexpressions matched against the full filename of reports within the factory. \n\nThis ability to use of regular expressions is useful when you're actively\nworking on developing your reports but once the factory is setup we recommend\npassing full filenames to the function so it is always clear what will be built.\n\n```{r compile}\ncompile_reports( \n  reports = \"example_report.Rmd\"\n)\n```\n\nUse `list_ouputs()` to view the report outputs.\n```{r outputs}\nlist_outputs()\n```\n\n`compile_reports()` can also be used to pass a set of parameters to use with a\nparameterised report (here we use a subfolder argument to distinguish the\nparameterised reports).\n\n```{r compileparams}\ncompile_reports(\n  reports = \"example_report.Rmd\",\n  params = list(graph = FALSE),\n  subfolder = \"regional\"\n)\nlist_outputs()\n```\n\nNote that reports can also be an integer or a logical vector, in which case it\nis interpreted as a subset of files output by list_reports(). For instance:\n  \n  * `compile_reports(reports = c(1, 3))` will compile the first and third\n    reports listed by list_reports(); and\n  * `compile_reports(reports = TRUE)` will compile all reports.\n\n### Factory overview\n\nIf you want to have an overview of your entire factory then you can use the\n`factory_overview()` function:\n```{r factoryoverview}\nfactory_overview()\n```\n\n## Contributing guidelines\nContributions are welcome via **pull requests**.\n\n### Code of Conduct\nPlease note that the reportfactory project is released with a \n[Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).\nBy contributing to this project, you agree to abide by its terms.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freconverse%2Freportfactory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freconverse%2Freportfactory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freconverse%2Freportfactory/lists"}