{"id":14067064,"url":"https://github.com/r-lib/rcmdcheck","last_synced_at":"2025-05-16T12:08:16.505Z","repository":{"id":4256113,"uuid":"52523733","full_name":"r-lib/rcmdcheck","owner":"r-lib","description":"Run R CMD check from R and collect the results","archived":false,"fork":false,"pushed_at":"2024-10-07T12:22:10.000Z","size":4253,"stargazers_count":115,"open_issues_count":32,"forks_count":29,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-30T22:05:50.837Z","etag":null,"topics":["r"],"latest_commit_sha":null,"homepage":"https://rcmdcheck.r-lib.org","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/r-lib.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-25T12:45:25.000Z","updated_at":"2025-03-22T08:14:27.000Z","dependencies_parsed_at":"2023-07-05T18:32:01.145Z","dependency_job_id":"7e3a7928-ffd5-4e88-b1f5-08eefaccc41e","html_url":"https://github.com/r-lib/rcmdcheck","commit_stats":{"total_commits":380,"total_committers":16,"mean_commits":23.75,"dds":"0.17105263157894735","last_synced_commit":"23d9dc145dc43ec1a9736d7fe9069277cb3f0a99"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Frcmdcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Frcmdcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Frcmdcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Frcmdcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-lib","download_url":"https://codeload.github.com/r-lib/rcmdcheck/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247563929,"owners_count":20958971,"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":["r"],"created_at":"2024-08-13T07:05:24.913Z","updated_at":"2025-05-16T12:08:16.493Z","avatar_url":"https://github.com/r-lib.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\ntitle: \"Run R CMD check from R and Capture Results\"\noutput:\n  github_document:\n    toc: true\n    toc_depth: 2\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r}\n#| 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# rcmdcheck\n\n\u003e Run R CMD check from R and Capture Results\n\n\u003c!-- badges: start --\u003e\n[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n[![](https://www.r-pkg.org/badges/version/rcmdcheck)](https://www.r-pkg.org/pkg/rcmdcheck)\n[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/rcmdcheck)](https://www.r-pkg.org/pkg/rcmdcheck)\n[![R-CMD-check](https://github.com/r-lib/rcmdcheck/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/rcmdcheck/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/r-lib/rcmdcheck/graph/badge.svg)](https://app.codecov.io/gh/r-lib/rcmdcheck)\n\u003c!-- badges: end --\u003e\n\nRun R CMD check from R programmatically and capture the results of the\nindividual checks.\n\n## Installation\n\nInstall the released version from CRAN\n\n```r\ninstall.packages(\"rcmdcheck\")\n```\n\nOr install the development version from GitHub:\n\n```r\n# install.packages(\"pak\")\npak::pak(\"r-lib/rcmdcheck\")\n```\n\n## Usage\n\n```r\nlibrary(rcmdcheck)\nrcmdcheck(\"path/to/R/package\")\n```\n\nCall `rcmdcheck()` on a source R package `.tar.gz` file, or on a folder\ncontaining your R package. Supply `quiet = FALSE` if you want to omit the\noutput. The result of the check is returned, in a list with elements\n`errors`, `warnings`, and `notes`. Each element is a character vector,\nand one element of the character vectors is a single failure.\n\n\u003cimg width=\"1000\" src=\"https://cdn.jsdelivr.net/gh/r-lib/rcmdcheck@main/tools/rcmdcheck.svg\" alt=\"animated screenshot of a terminal window demonstrating example usage of the rcmdcheck function.\"\u003e\n\n### Programmatic usage\n\n`rcmdcheck()` returns an `rcmdcheck` object, which you can query and\nmanipulate.\n\n```{r}\nlibrary(rcmdcheck)\nchk \u003c- rcmdcheck(\"tests/testthat/bad1\", quiet = TRUE)\nchk\n```\n\n`check_details()` turns the check results into a simple lists with the\nfollowing information currently:\n\n```{r}\nnames(check_details(chk))\n```\n\n* `package`: Package name.\n* `version`: Package version number.\n* `notes`: Character vector of check `NOTE`s.\n* `warnings`: Character vector of check `WARNING`s.\n* `errors`: Character vector of check `ERROR`s.\n* `platform`: Platform, e.g. `x86_64-apple-darwin15.6.0`.\n* `checkdir`: Check directory.\n* `install_out`: Output of the package installation.\n* `description`: The text of the `DESCRIPTION` file.\n* `session_info`: A `sessioninfo::session_info` object, session information\n  from within the check process.\n* `cran`: Flag, whether this is a CRAN package. (Based on the `Repository`\n  field in `DESCRIPTION`, which is typically only set for published CRAN\n  packages.)\n* `bioc`: Flag, whether this is a Bioconductor package, based on the\n  presence of the `biocViews` field in `DESCRIPTION`.\n\nNote that if the check results were parsed from a file, some of these\nfields might be missing (`NULL`), as we don't have access to the original\n`DESCRIPTION`, the installation output, etc.\n\n### Parsing check output\n\n`parse_check()` parses check output from a file, `parse_check_url()`\nparses check output from a URL.\n\n### CRAN checks\n\nrcmdcheck has a functions to access CRAN's package check results.\n\n`cran_check_flavours()` downloads the names of the CRAN platforms:\n\n```{r}\ncran_check_flavours()\n```\n\n`cran_check_results()` loads and parses all check results for a package.\n\n```{r}\ncran_check_results(\"igraph\")\n```\n\n### Comparing checks\n\n`compare_checks()` can compare two or more `rcmdcheck` objects.\n`compare_to_cran()` compares an `rcmdcheck` object to the CRAN checks of\nthe same package:\n\n```{r}\nchk \u003c- rcmdcheck(quiet = TRUE)\ncompare_to_cran(chk)\n```\n\n### Background processes\n\n`rcmdcheck_process` is a `processx::process` class, that can run\n`R CMD check` in the background. You can also use this to run multiple\nchecks concurrently. `processx::process` methods can be used to poll or\nmanipulate the check processes.\n\n```{r}\nchkpx \u003c- rcmdcheck_process$new()\nchkpx\n```\n\n```{r}\nchkpx$wait()\nchkpx$parse_results()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Frcmdcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-lib%2Frcmdcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Frcmdcheck/lists"}