{"id":16572296,"url":"https://github.com/jonocarroll/purrr2for","last_synced_at":"2025-10-29T00:36:29.240Z","repository":{"id":71014095,"uuid":"178744669","full_name":"jonocarroll/purrr2for","owner":"jonocarroll","description":"Automagically Convert purrr R Calls to Efficient Julia for Loops","archived":false,"fork":false,"pushed_at":"2019-03-31T22:06:40.000Z","size":163,"stargazers_count":49,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T01:11:24.118Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonocarroll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-03-31T21:32:59.000Z","updated_at":"2024-03-03T19:27:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"675c82fa-f7dd-4431-bc40-aefc4ee4b282","html_url":"https://github.com/jonocarroll/purrr2for","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonocarroll%2Fpurrr2for","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonocarroll%2Fpurrr2for/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonocarroll%2Fpurrr2for/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonocarroll%2Fpurrr2for/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonocarroll","download_url":"https://codeload.github.com/jonocarroll/purrr2for/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244799280,"owners_count":20512223,"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":[],"created_at":"2024-10-11T21:27:03.120Z","updated_at":"2025-10-29T00:36:29.139Z","avatar_url":"https://github.com/jonocarroll.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# purrr2for\n\n\u003cimg src=\"inst/figures/hex.png\" width=\"200\"\u003e\n\nConcerned about R performance?\n\nAutomagically convert R/`purrr` syntax code blocks into efficient Julia `for` loops\nwith a simple Addin. No writing of Julia/RCpp code itself, the converter is feature-complete \nwith both R's `purrr` and `*pply` family and writes the required Julia code.\n\n## Installation\n\nYou can install the released version of purrr2for from [GitHub](https://github.com/jonocarroll/purrr2for) with:\n\n``` r\ndevtools::install_github(\"jonocarroll/purrr2for\")\n```\n\n## Example\n\nIf you have a code block written in R (`purrr` or `*pply` loop)\n\n``` r\nmap(1:10, function(x) x^2)\n```\n\nthe Addin will convert this into a Julia call for you\n\n``` Julia\nmap(x -\u003e x^2, 1:10)\n```\n\nThis can be wrapped in a [`JuliaCall`](https://cran.r-project.org/web/packages/JuliaCall/index.html) block and run inline.\n\n## Benchmarks\n\n``` r\nUnit: microseconds\n                              expr     min      lq      mean  median       uq      max neval cld\npurrr::map(1:10, function(x) 10^2) 249.332 260.999 289.59205 265.926 286.9025 1474.852   100   b\n       [Julia] map(x -\u003e x^2, 1:10)  29.030  32.084  57.02304  36.705  38.8305 1917.149   100  a \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonocarroll%2Fpurrr2for","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonocarroll%2Fpurrr2for","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonocarroll%2Fpurrr2for/lists"}