Sha256: 1e5e68b0f65b8446bdc57a1539835fe9c92c91cdc38d6935e9d3fe56ee4c2212
Contents?: true
Size: 1.18 KB
Versions: 74
Compression:
Stored size: 1.18 KB
Contents
# Word Count Given a phrase, count the occurrences of each word in that phrase. For example for the input `"olly olly in come free"` ```text olly: 2 in: 1 come: 1 free: 1 ``` ## Installation See [this guide](https://github.com/exercism/xr/blob/master/docs/INSTALLATION.md) for instructions on how to setup your local R environment. ## How to implement your solution In each problem folder, there is a file named `<exercise_name>.R` containing a function that returns a `NULL` value. Place your implementation inside the body of the function. ## How to run tests Inside of RStudio, simply execute the `test_<exercise_name>.R` script. This can be conveniently done with [testthat's `auto_test` function](https://www.rdocumentation.org/packages/testthat/topics/auto_test). Because exercism code and tests are in the same folder, use this same path for both `code_path` and `test_path` parameters. On the command-line, you can also run `Rscript test_<exercise_name>.R`. ## Source This is a classic toy problem, but we were reminded of it by seeing it in the Go Tour. ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise.
Version data entries
74 entries across 74 versions & 1 rubygems