{"id":20665599,"url":"https://github.com/thinkr-open/arpr","last_synced_at":"2025-12-12T02:27:51.782Z","repository":{"id":56934737,"uuid":"391404538","full_name":"ThinkR-open/arpr","owner":"ThinkR-open","description":"Advanced R Pipes","archived":false,"fork":false,"pushed_at":"2021-08-01T12:18:14.000Z","size":55,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-12T13:58:08.320Z","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/ThinkR-open.png","metadata":{"files":{"readme":"README.Rmd","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}},"created_at":"2021-07-31T16:12:25.000Z","updated_at":"2023-12-05T19:50:55.000Z","dependencies_parsed_at":"2022-08-21T00:40:33.705Z","dependency_job_id":null,"html_url":"https://github.com/ThinkR-open/arpr","commit_stats":null,"previous_names":["thinkr-open/arpr","statnmap/arpr"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Farpr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Farpr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Farpr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Farpr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThinkR-open","download_url":"https://codeload.github.com/ThinkR-open/arpr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224963056,"owners_count":17399360,"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-11-16T19:32:34.638Z","updated_at":"2025-12-12T02:27:51.734Z","avatar_url":"https://github.com/ThinkR-open.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# arpr\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/statnmap/arpr/workflows/R-CMD-check/badge.svg)](https://github.com/statnmap/arpr/actions)\n\u003c!-- badges: end --\u003e\n\nThe goal of arpr is to provide convenience functions for programming with magrittr pipes. Conditional pipes, a string prefixer and a function to pipe the given object into a specific argument given by character name are currently supported. It is named after the dadaist Hans Arp, a friend of Rene Magritte.\n\n\n_Note that the {arpr} package was originally created by [Jirka Lewandowski](https://github.com/jirkalewandowski). The present repository is a fork to be able to continue development of this package, required for [{gitlabr}](https://github.com/statnmap/gitlabr)._  \n\n## Installation\n\nYou can install the released version of arpr from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"arpr\")\n```\n\nAnd the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"statnmap/arpr\")\n```\n\n## Examples\n\n```{r}\nlibrary(arpr)\n```\n\n\n- Prefix a string of text \n\n```{r}\n\"xyz\" %\u003e%\n   prefix(\"abc\")\n```\n\n- `iff()` applies a function if and only if test is TRUE\n  + otherwise return input value unchanged\n  + `iffn()` is if and only if test is FALSE\n\n```{r}\nx \u003c- 1\nx %\u003e%\n  iff(is.na, const(0))\nx \u003c- NA\nx %\u003e%\n  iff(is.na, const(0))\n\nx \u003c- 1\nx %\u003e%\n  iff(x \u003c= 0, function(x) { x - 2 })\nx \u003c- -1\nx %\u003e%\n  iff(x \u003c= 0, function(x) { x - 2 })\n\nx \u003c- NA\nx %\u003e%\n  iffn(is.na, exp)\nx \u003c- 10\nx %\u003e%\n  iffn(is.na, exp)\n```\n\n-  Pipe into specific formal argument\n\n```{r}\n5L %\u003e%\n  pipe_into(\"digits\", format, 2.731234567)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkr-open%2Farpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkr-open%2Farpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkr-open%2Farpr/lists"}