{"id":14069550,"url":"https://github.com/insightsengineering/r.pkg.template","last_synced_at":"2025-08-21T06:31:25.674Z","repository":{"id":37446308,"uuid":"383270673","full_name":"insightsengineering/r.pkg.template","owner":"insightsengineering","description":"An opinionated R package template with CI/CD built-in","archived":false,"fork":false,"pushed_at":"2024-09-12T14:36:52.000Z","size":4499,"stargazers_count":36,"open_issues_count":4,"forks_count":17,"subscribers_count":19,"default_branch":"main","last_synced_at":"2024-09-13T22:57:28.758Z","etag":null,"topics":["git","github-actions","r","template"],"latest_commit_sha":null,"homepage":"https://insightsengineering.github.io/r.pkg.template/","language":"Shell","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/insightsengineering.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://pharmaverse.org"]}},"created_at":"2021-07-05T21:42:43.000Z","updated_at":"2024-08-20T06:47:16.000Z","dependencies_parsed_at":"2024-01-24T15:51:16.303Z","dependency_job_id":"202d50bf-f955-489d-bb5d-f4c07d613d18","html_url":"https://github.com/insightsengineering/r.pkg.template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2Fr.pkg.template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2Fr.pkg.template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2Fr.pkg.template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insightsengineering%2Fr.pkg.template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/insightsengineering","download_url":"https://codeload.github.com/insightsengineering/r.pkg.template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230494921,"owners_count":18235046,"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":["git","github-actions","r","template"],"created_at":"2024-08-13T07:07:02.565Z","updated_at":"2024-12-19T20:08:41.853Z","avatar_url":"https://github.com/insightsengineering.png","language":"Shell","funding_links":["https://pharmaverse.org"],"categories":["Ranked by starred repositories","Shell"],"sub_categories":[],"readme":"# r.pkg.template\n\n![GitHub forks](https://img.shields.io/github/forks/insightsengineering/r.pkg.template?style=social)\n![GitHub Repo stars](https://img.shields.io/github/stars/insightsengineering/r.pkg.template?style=social)\n\n![GitHub commit activity](https://img.shields.io/github/commit-activity/m/insightsengineering/r.pkg.template)\n![GitHub contributors](https://img.shields.io/github/contributors/insightsengineering/r.pkg.template)\n![GitHub last commit](https://img.shields.io/github/last-commit/insightsengineering/r.pkg.template)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/insightsengineering/r.pkg.template)\n![GitHub repo size](https://img.shields.io/github/repo-size/insightsengineering/r.pkg.template)\n![GitHub language count](https://img.shields.io/github/languages/count/insightsengineering/r.pkg.template)\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![Downloads](https://img.shields.io/github/downloads/insightsengineering/r.pkg.template/latest/total)](https://tooomm.github.io/github-release-stats/?username=insightsengineering\\\u0026repository=r.pkg.template)\n[![Current Version](https://img.shields.io/github/r-package/v/insightsengineering/r.pkg.template/main?color=purple\\\u0026label=package%20version)](https://github.com/insightsengineering/r.pkg.template/tree/main)\n[![Open Issues](https://img.shields.io/github/issues-raw/insightsengineering/r.pkg.template?color=red\\\u0026label=open%20issues)](https://github.com/insightsengineering/r.pkg.template/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)\n\n[![Audit Dependencies](https://github.com/insightsengineering/r.pkg.template/actions/workflows/audit.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/audit.yaml)\n[![BiocCheck](https://github.com/insightsengineering/r.pkg.template/actions/workflows/bioccheck.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/bioccheck.yaml)\n[![Check URLs](https://github.com/insightsengineering/r.pkg.template/actions/workflows/links.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/links.yaml)\n[![Coverage](https://github.com/insightsengineering/r.pkg.template/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/test-coverage.yaml)\n[![License report](https://github.com/insightsengineering/r.pkg.template/actions/workflows/licenses.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/licenses.yaml)\n[![Pkgdown Docs](https://github.com/insightsengineering/r.pkg.template/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/pkgdown.yaml)\n[![R CMD Check](https://github.com/insightsengineering/r.pkg.template/actions/workflows/build-check-install.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/build-check-install.yaml)\n[![R Package Validation report](https://github.com/insightsengineering/r.pkg.template/actions/workflows/validation.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/validation.yaml)\n[![Release](https://github.com/insightsengineering/r.pkg.template/actions/workflows/release.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/release.yaml)\n[![Roxygen](https://github.com/insightsengineering/r.pkg.template/actions/workflows/roxygen.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/roxygen.yaml)\n[![Spelling](https://github.com/insightsengineering/r.pkg.template/actions/workflows/spelling.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/spelling.yaml)\n[![Style](https://github.com/insightsengineering/r.pkg.template/actions/workflows/style.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/style.yaml)\n[![SuperLinter](https://github.com/insightsengineering/r.pkg.template/actions/workflows/linter.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/linter.yaml)\n[![Version bump](https://github.com/insightsengineering/r.pkg.template/actions/workflows/version-bump.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/version-bump.yaml)\n[![Version check](https://github.com/insightsengineering/r.pkg.template/actions/workflows/version.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/version.yaml)\n[![gitleaks](https://github.com/insightsengineering/r.pkg.template/actions/workflows/gitleaks.yaml/badge.svg)](https://github.com/insightsengineering/r.pkg.template/actions/workflows/gitleaks.yaml)\n\n\u003c!-- links --\u003e\n\n[pre-commit]: https://pre-commit.com\n\n[pre-commit installation]: https://pre-commit.com/#installation\n\n[git hooks]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks\n\nAn R package template with built-in GitHub Actions-based CI/CD workflows.\n\n## Usage\n\n### Initialization\n\nYou could initialize this repository in one of two ways:\n\n#### Clone this template\n\n* Clone this repository:\n\n  ```bash\n  git clone https://github.com/insightsengineering/r.pkg.template.git\n  cd r.pkg.template\n  ```\n\n* Run the initializer script:\n\n  ```bash\n  ./init.sh\n  ```\n\n#### Use GitHub's template importer\n\n* Click [here](https://github.com/insightsengineering/r.pkg.template/generate) to generate a copy of this template directly within GitHub.\n\n* Clone the repository from your account/organization.\n\n* Run the initializer script:\n\n  ```bash\n  ./init.sh\n  ```\n\n### CI/CD Configurations\n\nAll CI/CD jobs are defined in the [.github/workflows](./.github/workflows) directory in the form of GitHub Action workflows. These can be modified per your requirements, but are designed and implemented to follow best practices and to ensure the highest quality standards for your package.\n\nAll workflows originating from this repository can be repurposed by other R package GitHub repositories.\n\n👉 For more information including detailed description and screenshots of workflows, please refer to the [Workflows documentation](./workflows.md).\n\n### Pre-commit\n\nThis repository contains an example [pre-commit] configuration.\n\n[pre-commit] is a tool that uses [Git hooks] to identify and resolve simple issues before submission for code review.\n[Git hooks] run on every commit to automatically point out and solve issues such as missing semicolons, trailing whitespaces,\ncode formatting and spell checks.\n\n### Setting up pre-commit for R project\n\n* Install the `pre-commit` framework. Use the official [installation guide][pre-commit installation].\n\n* Install R package `precommit`\n\n  ```sh\n  R -e 'install.packages(\"precommit\")'\n  ```\n\n* Run the `use_precommit()` function to generate an example pre-commit configuration called `.pre-commit-config.yaml`:\n\n  ```sh\n  [ ! -f \".pre-commit-config.yaml\" ] \u0026\u0026 R -e 'precommit::use_precommit()'\n  ```\n\n* Install the git hooks script:\n\n  ```sh\n  pre-commit install\n  ```\n\n* From this moment on, all scripts from `.pre-commit-config.yaml` will run before every `git commit` command. If you want to run them manually without committing you can use command `pre-commit run --all-files`. For more information, please refer to the official [pre-commit] documentation.\n\n\u003e NOTE: Frequently run `pre-commit autoupdate` to update all hooks in the `.pre-commit-config.yaml` configuration file.\n\n### Example output from pre-commit\n\n```sh\n$ git add .\n$ git commit -m \"Add pre-commit configuration\"\n[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.\n[INFO] Once installed this environment will be reused.\n[INFO] This may take a few minutes...\nstyle-files..............................................................Passed\nroxygenize...........................................(no files to check)Skipped\nuse-tidy-description.....................................................Passed\nspell-check..............................................................Failed\n- hook id: spell-check\n- exit code: 1\n- files were modified by this hook\n\nThe following spelling errors were found:\n  WORD          FOUND IN\ncommiting     README.md:77\nindentify     README.md:49\ninformatoin   README.md:77\nAll spelling errors found were copied to inst/WORDLIST assuming they were not spelling errors and will be ignored in the future. Please  review the above list and for each word that is an actual typo:\n - fix it in the source code.\n - remove it again manually from inst/WORDLIST to make sure it's not\n   ignored in the future.\n Then, try committing again.\nError: Spell check failed\nExecution halted\n\nlintr....................................................................Passed\nreadme-rmd-rendered......................................................Passed\nparsable-R...............................................................Passed\nno-browser-statement.....................................................Passed\ndeps-in-desc.............................................................Passed\nprettier.................................................................Failed\n- hook id: prettier\n- files were modified by this hook\n\n.pre-commit-config.yaml\nREADME.md\n\nCheck for added large files..............................................Passed\nFix End of Files.........................................................Passed\nTrim Trailing Whitespace.................................................Failed\n- hook id: trailing-whitespace\n- exit code: 1\n- files were modified by this hook\n\nFixing .pre-commit-config.yaml\nFixing README.md\n\nCheck Yaml...............................................................Passed\nDon't commit to branch...................................................Passed\nMixed line ending........................................................Passed\nDon't commit common R artifacts......................(no files to check)Skipped\n```\n\n## Stargazers and Forkers\n\n### Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/insightsengineering/r.pkg.template.svg)](https://starchart.cc/insightsengineering/r.pkg.template)\n\n### Stargazers\n\n[![Stargazers repo roster for @insightsengineering/r.pkg.template](https://reporoster.com/stars/insightsengineering/r.pkg.template)](https://github.com/insightsengineering/r.pkg.template/stargazers)\n\n### Forkers\n\n[![Forkers repo roster for @insightsengineering/r.pkg.template](https://reporoster.com/forks/insightsengineering/r.pkg.template)](https://github.com/insightsengineering/r.pkg.template/network/members)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsightsengineering%2Fr.pkg.template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsightsengineering%2Fr.pkg.template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsightsengineering%2Fr.pkg.template/lists"}