Posts Tagged ‘ magrittr ’

R Tip: Make Arguments Explicit in magrittr/dplyr Pipelines

March 1, 2018
By

I think this is the R Tip that is going to be the most controversial yet. Its potential pitfalls include: it is a style prescription (which makes it different than and less immediately useful than something of the nature of R Tip: Force Named Arguments), and it is heterodox (this is not how magrittr/dplyr is … Continue reading R Tip: Make Arguments Explicit in magrittr/dplyr Pipelines

Read more »

RStudio Keyboard Shortcuts for Pipes

November 18, 2017
By
RStudio Keyboard Shortcuts for Pipes

I have just released some simple RStudio add-ins that are great for creating keyboard shortcuts when working with pipes in R. You can install the add-ins from here (which also includes both installation instructions and use instructions/examples).

Read more »

What is magrittr’s future in the tidyverse?

July 10, 2017
By
What is magrittr’s future in the tidyverse?

For many R users the magrittr pipe is a popular way to arrange computation and famously part of the tidyverse. The tidyverse itself is a rapidly evolving centrally controlled package collection. The tidyverse authors publicly appear to be interested in re-basing the tidyverse in terms of their new rlang/tidyeval package. So it is natural to … Continue reading What is magrittr’s future in the tidyverse?

Read more »

Data validation with the assertr package

March 20, 2017
By
Data validation with the assertr package

Version 2.0 of my data set validation package assertr hit CRAN just this weekend. It has some pretty great improvements over version 1. For those new to the package, what follows is a short and new introduction. For those who… Continue reading →

Read more »

Using the Bizarro Pipe to Debug magrittr Pipelines in R

January 30, 2017
By
Using the Bizarro Pipe to Debug magrittr Pipelines in R

I have just finished and released a free new R video lecture demonstrating how to use the “Bizarro pipe” to debug magrittr pipelines. I think R dplyr users will really enjoy it. Please read on for the link to the video lecture. In this video lecture I use the “Bizarro pipe” to debug the example … Continue reading Using the Bizarro Pipe to Debug magrittr Pipelines in R

Read more »

Comparative examples using replyr::let

December 22, 2016
By
Comparative examples using replyr::let

Consider the problem of “parametric programming” in R. That is: simply writing correct code before knowing some details, such as the names of the columns your procedure will have to be applied to in the future. Our latest version of replyr::let makes such programming easier. Archie’s Mechanics #2 (1954) copyright Archie Publications (edit: great news! … Continue reading Comparative examples using replyr::let

Read more »

The Case For Using -> In R

December 13, 2016
By
The Case For Using -> In R

R has a number of assignment operators (at least “<-“, “=“, and “->“; plus “<<-” and “->>” which have different semantics). The R-style guides routinely insist on “<-” as being the only preferred form. In this note we are going to try to make the case for “->” when using magrittr pipelines. [edit: After reading … Continue reading The Case For Using -> In R

Read more »

I loved this %>% crosstable

July 28, 2015
By
I loved this %>% crosstable

This is a public tank you for @heatherturner's contribution. Now the SciencesPo's crosstable can work in a chain (%>%) fashion; useful for using along with other packages that have integrated the magrittr operator. > candidatos %>% + filter(desc_cargo == 'DEPUTADO ESTADUAL'| desc_cargo =='DEPUTADO DISTRITAL' | desc_cargo =='DEPUTADO FEDERAL' | desc_cargo =='VEREADOR' | desc_cargo =='SENADOR') %>% … Read More →

Read more »

Lessons learned in high-performance R

Lessons learned in high-performance R

On this blog, I've had a long running investigation/demonstration of how to make a "embarrassingly-parallel" but computationally intractable (on commodity hardware, at least) R problem more performant by using parallel computation and Rcpp. The example problem is to find the… Continue reading →

Read more »

Playing around with #rstats twitter data

February 28, 2015
By
Playing around with #rstats twitter data

As a bit of weekend fun, I decided to briefly look into the #rstats twitter data that Stephen Turner collected and made available (thanks!). Essentially, this data set contains some basic information about over 100,000 tweets that contain the hashtag… Continue reading →

Read more »


Subscribe

Email:

  Subscribe