{"id":20917510,"url":"https://github.com/nimble-dev/nimble-devtools","last_synced_at":"2026-04-26T19:31:54.809Z","repository":{"id":81858970,"uuid":"89511728","full_name":"nimble-dev/nimble-devtools","owner":"nimble-dev","description":"Developer tools for the NIMBLE project http://r-nimble.org","archived":false,"fork":false,"pushed_at":"2017-05-16T21:59:25.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-12-26T07:50:17.686Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nimble-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2017-04-26T18:03:51.000Z","updated_at":"2017-05-04T02:50:18.000Z","dependencies_parsed_at":"2023-04-23T10:08:56.373Z","dependency_job_id":null,"html_url":"https://github.com/nimble-dev/nimble-devtools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nimble-dev/nimble-devtools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimble-dev%2Fnimble-devtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimble-dev%2Fnimble-devtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimble-dev%2Fnimble-devtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimble-dev%2Fnimble-devtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nimble-dev","download_url":"https://codeload.github.com/nimble-dev/nimble-devtools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimble-dev%2Fnimble-devtools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32310804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-18T16:33:45.103Z","updated_at":"2026-04-26T19:31:54.790Z","avatar_url":"https://github.com/nimble-dev.png","language":"R","readme":"# Developer tools for the [NIMBLE](http://r-nimble.org) project\n\nFirst install this package:\n```{r}\ndevtools::install_github('nimble-dev/nimble-devtools')\n```\nNext restart RStudio and verify that you see menu items\n`Tools \u003e Addins \u003e Hot Reload Code` and\n`Tools \u003e Addins \u003e Open Genrated C++ Files`.\n\nTo use RStudio addins, you may need to upgrade to a more recent RStudio.\n\n## RStudio Addin: Reload NIMBLE code without reinstalling NIMBLE\n\nIf you modify an internal NIMBLE function in-place and want to reload it quickly\n(without a lengthy R CMD INSTALL process), you can use our Hot Reload addin for\nRStudio. (This is just a smart wrapper around `assignInNamespace`.)\n\n1.  (optional) Set a keyboard shortcut for the hot reload addin using\n    `Tools \u003e Addins \u003e Browse Addins...`. For example I use `CTRL-R`.\n\n2.  In an RStudio editor window, position the cursor on the first line of the\n    definition `name \u003c- function(...){...}` of your modified NIMBLE code.\n\n3.  Either click on the `Tools \u003e Addins \u003e Hot Reload Code` menu item, or use\n    your new keyboard shortcut.\n\n## RStudio Addin: Open the latest generated C++ files in `tempdir()`\n\n1.  (optional) Set a keyboard shortcut for the Open Generated C++ addin using\n    `Tools \u003e Addins \u003e Browse Addins...`. For example I use `CTRL-G`.\n\n2. Generate some C++ files with `compileNimble()`\n\n3.  Either click on the `Tools \u003e Addins \u003e Open Generated C++ Files` menu item,\n    or use your new keyboard shortcut.\n\n## Speed up package installation\n\nThese steps attempt to speed up `R CMD build nimble \u0026\u0026 R CMD INSTALL nimble_*.tar.gz`:\n\n1.  (Savings: 50%) On Linux or OS X, use ccache.\n    Following Dirk Eddelbuettel's [advice](http://stackoverflow.com/questions/13929514/how-to-enable-ccache-on-linux), you can enable ccache globally on your system by creating symbolic links to ccache for each of the compilers you use: \n\n    ```{sh}\n    cd /usr/local/bin\n    sudo ln -s /usr/bin/ccache gcc\n    sudo ln -s /usr/bin/ccache g++\n    sudo ln -s /usr/bin/ccache clang\n    sudo ln -s /usr/bin/ccache clang++\n    ```\n\n2.  (Savings: 25%) Add tons of `--no-\u003cexpensive operation\u003e` flags to your R CMD INSTALL invocation.\n     Fritz wrapped this in a script [nim-install.sh](nim-install.sh) in this repo.\n     **TODO** add a .bat file or something for Windows users.\n     \n3.  Further research is needed. Fritz started to profile package installation with [profile_install_nimble.R](profile_install_nimble.R)\n\n## Run a single test file\n\nPerry suggested the following test wrapper to run tests in a single file:\n\n```{r}\nlibrary(nimble)\nlibrary(testthat)\nsource(system.file(file.path('tests', 'test_utils.R'), package = 'nimble'))\nif (0) options(error = recover) else options(error = NULL)  # Toggle 0/1 to enable/disable recover().\n\n# This tests the file 'tests/test-optim.R'.\ntest_package('nimble', 'optim', reporter = 'tap')  # tap has prettier error reporting.\n```\n\n## Quickly open the latest NIMBLE-generated C++ files\n\nTo quickly open the latest generated C++ files\n\n1.  Install [clang-format](https://clang.llvm.org/docs/ClangFormat.html)\n    so that the files can be automatically formatted. For example\n\n    ```{bash}\n    brew install clang-format          # OS X\n    sudo apt-get install clang-format  # linux\n    ```\n\n2.  Set your `EDITOR` environment variable to your favorite editor\n    (`vim`, `emacs`, `sublime`, etc.)\n\n3.  Configure nimble to compile to the directory `~/tmp`\n\n    ```{r}\n    compileNimble(myFunction, dirName = '~/tmp')\n    ```\n\n4.  Run [nim-show.py](nim-show.py).\n    I've added this to my `PATH` so I can type `nim-sh\u003cTAB\u003e\u003cENTER\u003e`\n    anywhere to quickly see the latest \n\n## Navigate Source Code\n\nIf you're an Emacs or Vim user, you can make use of the [`rtags()`](https://www.rdocumentation.org/packages/utils/versions/3.3.2/topics/rtags) function to generate tags files to more quickly navigate source code.\nPerry recommends the command `R CMD rtags`.\nThis lets you jump-to-defintion of a symbol.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimble-dev%2Fnimble-devtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnimble-dev%2Fnimble-devtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimble-dev%2Fnimble-devtools/lists"}