The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
The 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.
Note that the {arpr} package was originally created by Jirka Lewandowski. The present repository is a fork to be able to continue development of this package, required for {gitlabr}.
You can install the released version of arpr from CRAN with:
install.packages("arpr")
And the development version from GitHub with:
# install.packages("devtools")
::install_github("statnmap/arpr") devtools
library(arpr)
"xyz" %>%
prefix("abc")
#> [1] "abcxyz"
iff()
applies a function if and only if test is TRUE
iffn()
is if and only if test is FALSE<- 1
x %>%
x iff(is.na, const(0))
#> [1] 1
<- NA
x %>%
x iff(is.na, const(0))
#> [1] 0
<- 1
x %>%
x iff(x <= 0, function(x) { x - 2 })
#> [1] 1
<- -1
x %>%
x iff(x <= 0, function(x) { x - 2 })
#> [1] -3
<- NA
x %>%
x iffn(is.na, exp)
#> [1] NA
<- 10
x %>%
x iffn(is.na, exp)
#> [1] 22026.47
%>%
5L pipe_into("digits", format, 2.731234567)
#> [1] "2.7312"
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.