wrapr 1.5.0 available on CRAN
The R package wrapr 1.5.0 is now available on CRAN. wrapr includes a lot of tools for writing better R code: let() (let block) %.>% (dot arrow pipe) build_frame() / draw_frame() ( data.frame...
View ArticleR Tip: Be Wary of “…”
R Tip: be wary of “...“. The following code example contains an easy error in using the R function unique(). vec1 <- c("a", "b", "c") vec2 <- c("c", "d") unique(vec1, vec2) # [1] "a" "b" "c"...
View Articleseplyr 0.5.8 Now Available on CRAN
We are pleased to announce that seplyr version 0.5.8 is now available on CRAN. seplyr is an R package that provides a thin wrapper around elements of the dplyr package and (now with version 0.5.8) the...
View ArticleAnnouncing wrapr 1.6.2
wrapr 1.6.2 is now up on CRAN. We have some neat new features for R users to try (in addition to many earlier wrapr goodies). The first is the %in_block% alternate notation for let(). The wrapr...
View ArticleBetter R Code with wrapr Dot Arrow
Our R package wrapr supplies a "piping operator" that we feel is a real improvement in R code piped-style coding. The idea is: with wrapr‘s "dot arrow" pipe "%.>%" the expression "A %.>% B" is...
View ArticleDot-Pipe Paper Accepted by the R Journal!!!
We are thrilled to announce our (my and Nina Zumel’s) paper on the dot-pipe has been accepted by the R-Journal! A huge “thank you” to the reviewers and editors for helping us with this! You can find...
View ArticlePiping into ggplot2
In our wrapr pipe RJournal article we used piping into ggplot2 layers/geoms/items as an example. Being able to use the same pipe operator for data processing steps and for ggplot2 layering is a...
View ArticleUse Pseudo-Aggregators to Add Safety Checks to Your Data-Wrangling Workflow
One of the concepts we teach in both Practical Data Science with R and in our theory of data shaping is the importance of identifying the roles of columns in your data. For example, to think in terms...
View Articlecoalesce with wrapr
coalesce is a classic useful SQL operator that picks the first non-NULL value in a sequence of values. We thought we would share a nice version of it for picking non-NA R with convenient operator infix...
View ArticleQuoting in R
Many R users appear to be big fans of "code capturing" or "non standard evaluation" (NSE) interfaces. In this note we will discuss quoting and non-quoting interfaces in R. The above terms are simply...
View ArticleSharing Modeling Pipelines in R
Reusable modeling pipelines are a practical idea that gets re-developed many times in many contexts. wrapr supplies a particularly powerful pipeline notation, and a pipe-stage re-use system (notes...
View ArticleReusable Pipelines in R
Pipelines in R are popular, the most popular one being magrittr as used by dplyr. This note will discuss the advanced re-usable piping systems: rquery/rqdatatable operator trees and wrapr function...
View ArticleQuoting Concatenate
In our last note we used wrapr::qe() to help quote expressions. In this note we will discuss quoting and code-capturing interfaces (interfaces that capture user source code) a bit more. My position on...
View ArticleR Tip: Use Inline Operators For Legibility
R Tip: use inline operators for legibility. A Python feature I miss when working in R is the convenience of Python‘s inline + operator. In Python, + does the right thing for some built in data types:...
View ArticleFunction Objects and Pipelines in R
Composing functions and sequencing operations are core programming concepts. Some notable realizations of sequencing or pipelining operations include: Unix’s |-pipe CMS Pipelines. F#‘s forward pipe...
View ArticlePlaying With Pipe Notations
Recently Hadley Wickham prescribed pronouncing the magrittr pipe as “then” and using right-assignment as follows: I am not sure if it is a good or bad idea. But let’s play with it a bit, and perhaps...
View ArticleR Journal Volume 10/2, December 2018 is out!
We forgot to say: R Journal Volume 10/2, December 2018 is out! A huge thanks to the editors who work very hard to make this possible. And big “thank you” to the editors, referees, and journal for...
View Article“If You Were an R Function, What Function Would You Be?”
We’ve been getting some good uptake on our piping in R article announcement. The article is necessarily a bit technical. But one of its key points comes from the observation that piping into names is a...
View Article