{"id":20081991,"url":"https://github.com/exercism/r","last_synced_at":"2025-10-04T01:55:56.513Z","repository":{"id":21101391,"uuid":"24401761","full_name":"exercism/r","owner":"exercism","description":"Exercism exercises in R.","archived":false,"fork":false,"pushed_at":"2025-09-02T21:09:41.000Z","size":926,"stargazers_count":28,"open_issues_count":37,"forks_count":41,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-09-02T23:12:27.845Z","etag":null,"topics":["community-contributions-paused","exercism-track","maintained"],"latest_commit_sha":null,"homepage":"https://exercism.org/tracks/r","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exercism.png","metadata":{"funding":{"github":["exercism"],"custom":["https://exercism.org/donate"]},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-09-24T05:22:10.000Z","updated_at":"2025-09-02T21:09:44.000Z","dependencies_parsed_at":"2024-04-05T20:20:21.932Z","dependency_job_id":"849710fe-fa47-4e2d-8b5b-0430ffaf7504","html_url":"https://github.com/exercism/r","commit_stats":{"total_commits":367,"total_committers":36,"mean_commits":"10.194444444444445","dds":0.7220708446866485,"last_synced_commit":"ee6780993ba9ef13bddaf16931a5ca245f21833c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/exercism/r","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exercism","download_url":"https://codeload.github.com/exercism/r/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274112906,"owners_count":25224332,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["community-contributions-paused","exercism-track","maintained"],"created_at":"2024-11-13T15:41:17.363Z","updated_at":"2025-10-04T01:55:51.481Z","avatar_url":"https://github.com/exercism.png","language":"R","readme":"# Exercism R Track\n\n[![Build Status](https://github.com/exercism/r/workflows/Exercise%20tests/badge.svg)](https://github.com/exercism/r/actions/workflows/ci.yml)\n\nExercism problems in R\n\n## Contributing Guide\n\n- [Asking for help](#asking-for-help)\n- [How to contribute](#how-to-contribute)\n  * [Reporting or fixing bugs](#reporting-or-fixing-bugs)\n  * [Reviewing issues and pull requests](#reviewing-issues-and-pull-requests)\n  * [Porting exercises](#porting-exercises)\n  * [Updating an exercise test suite](#updating-an-exercise-test-suite)\n- [Repository structure and conventions](#repository-structure-and-conventions)\n  * [Directory structure](#directory-structure)\n  * [Exercise structure](#exercise-structure)\n- [Writing an issue](#writing-an-issue)\n- [Writing a pull request](#writing-a-pull-request)\n- [Development Dependencies](#development-dependencies)\n- [Example Solution](#example-solution)\n- [Test Suite](#test-suite)\n- [Running Tests](#running-tests)\n- [R Style Guide](#style-guide)\n\n### Asking for help\nIf stuck or in doubt just ask in the [Exercism forum][forum]! We try our best to be friendly and helpful, so don't be shy!\n\n### How to contribute\nAs a first step we recommend you read the [contributing guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).\n\n#### Reporting or fixing bugs\nTypical examples for a bug: A typo, a missing test case, an unclear or ambiguous problem description.\n- If you are unsure whether you have really found a bug [just ask](#asking-for-help).\n- To report a bug you can [write an issue](#writing-an-issue).\n- If you have a fix you can [write a pull request](#writing-a-pull-request).\n\n#### Reviewing issues and pull requests\nIf you have a dedicated opinion you are welcome to [write a comment](https://help.github.com/articles/commenting-on-a-pull-request/) for an [issue](https://github.com/exercism/r/issues) or a [pull request](https://github.com/exercism/r/pulls).\nPlease be detailed and include motivations or relevant links to support your opinion.\n\n#### Porting exercises\nSee here for more information about [porting an exercise](https://github.com/exercism/docs/blob/master/you-can-help/implement-an-exercise-from-specification.md).\nOf course you can also add a totally new exercise, but it might be a good idea to first discuss it in one of [our forums](#asking-for-help).\n\n#### Updating an exercise test suite\nUpdating the test suite of an existing exercise is a special case because it usually affects all languages. Read more about it [here](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md#updating-an-exercise-test-suite).\nNote that the test suite must run within a couple of seconds.\n\n### Repository structure and conventions\nA general description of all the files and directories can be found [here](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md#track-anatomy).\n\n#### Directory structure\n```bash\n├── .gitignore\n├── .travis.yml\n├── .github\n│ └── stale.yml\n├── config.json\n├── README.md\n└── LICENSE\n├── img\n│ └── icon.png\n├── bin\n│ ├── fetch‐configlet\n│ ├── run_lints.R\n│ └── run_tests.R\n├── docs\n│ ├── ABOUT.md\n│ ├── INSTALLATION.md\n│ ├── LEARNING.md\n│ ├── RESOURCES.md\n│ └── TESTS.md\n└── exercises\n  ├── TRACK_HINTS.md\n  ├── \u003cexercise-name\u003e\n  │ ├── \u003cexercise-name\u003e.R\n  │ ├── example.R\n  │ └── test_\u003cexercise-name\u003e.R\n  ├── \u003cexercise-name\u003e\n  │ ├── \u003cexercise-name\u003e.R\n  │ ├── example.R\n  │ └── test_\u003cexercise-name\u003e.R\n  └── ...\n```\n- `config.json`: Note that every exercise has to be registered here, with a unique name and a difficulty. The sequence order in this file determines the default order in which the exercises are fetched.\n\n#### Exercise structure\nEach exercise has the following structure:\n- `\u003cexercise-name\u003e.R` usually contains an empty function declaration, as a starting point for the required solution.\n- `example.R` is the source code of the sample solution.\n- `test_\u003cexercise-name\u003e.R` is the [test suite](#test-suite).\n- `HINTS.md` is an optional file containing instructions and/or hints. It is used together with the respective `description.md` for the exercise from [problem-specifications](https://github.com/exercism/problem-specifications) to build the `README.md` file.\n\n### Writing an issue\nTo report a bug you should [create an issue](https://help.github.com/articles/creating-an-issue/) [here](https://github.com/exercism/r/issues).\n\n### Writing a pull request\nTo fix a bug you should [create a pull request from a fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) from [here](https://github.com/exercism/r/pulls). See also [our Git Basics information](https://github.com/exercism/docs/blob/master/contributing/git-basics.md).\n\n### Development dependencies\nYou'll need to have a recent version of [R](https://cran.r-project.org/) installed on your system, as well as the `testthat` package (run `install.packages('testthat')` from the R console to install) in order to run tests.\n\nOptionally, you may also want to install [pre-commit](https://pre-commit.com/) in order to make use of the suggested pre-commit hooks (these will assist with automated code style checks etc). See the [Style Guide](#style-guide) for more info.\n\n### Example solution\nThe example solution doesn't have to be perfect, but should pass all of the tests and ideally also strive for a healthy balance of human readability and computational efficiency.\n\n### Test suite\nThe test suite should be derived from the respective `problem-specifications/exercises/\u003cexercise-name\u003e/canonical-data.json` and comply to some formatting and coding standards (to get an idea you can look at some of the existing tests).\n\n### Running tests\nTo run the tests for just a single exercise, run `source('test_\u003cexercise-name\u003e.R')` from within the exercise's directory. Note that when testing locally you'll need to replace the first line of `test_\u003cexercise-name\u003e.R` (which sources `\u003cexercise-name\u003e.R`) with `source('example.R')`. If you do this, remember to change it back before submitting any pull requests.\n\nAlternatively, to run tests for all exercises at once, simply run `source(\"bin/run_tests.R\")`.\n\nThe example solutions must pass the tests without failures. Additionally the tests should not run longer than a few seconds.\n\nIn order to be accepted by Travis-CI, each exercise must be registered in `config.json`.\n\n### Style guide\nThere are a variety of R style guides in circulation and opinions on the topic can vary widely which does make it hard to settle on specific standards. Our preference is to have R code in this repository follow the [tidyverse style guide](http://style.tidyverse.org/).\n\nYou are thus encouraged to run [`lintr`](https://github.com/jimhester/lintr) on your R scripts before opening a [pull request](#writing-a-pull-request) in order to check that your code adheres to this style guide before submitting it for review.\n\nNote however that at the moment only the following linting rules are strictly enforced:\n\n- line length should be less than 80 characters\n- objects should not be in camelCase, snake_case is preferred\n- the assignment operator \u003c- should be used\n- all commas should be followed by a space (but not preceded by one)\n- no absolute paths should be used\n- infix operators (+, -, =, \u003c-) should have spaces around them\n\nTo perform these specific checks locally, run `source(\"bin/run_lints.R\")`.\n\nWe also recommend using [styler](https://github.com/r-lib/styler). You can have styler run automatically (when making code commits) by making use of a [pre-commit](https://pre-commit.com) hook.\n\nSimply follow the installation instructions available [here](https://pre-commit.com/#install)\nand then from the terminal run `pre-commit install` in your repo. The hooks defined in `.pre-commit-config.yaml` will then run automatically on any subsequent commits. This should help deal with most of the linting requirements.\n\nYou can run `pre-commit autoupdate` occasionally to update the hook revisions.\n\n## R icon\nThe R logo was created by [Hadley Wickham](https://github.com/hadley) and others at [RStudio](https://www.rstudio.com/). The original file is licensed under version [4.0 of the Creative Commons Attribution-Share Alike license](https://creativecommons.org/licenses/by-sa/4.0/). We have adapted it, changing the colour scheme, for use on Exercism.\n\n[forum]: https://forum.exercism.org/\n","funding_links":["https://github.com/sponsors/exercism","https://exercism.org/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Fr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexercism%2Fr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Fr/lists"}