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 Rdplyr users will really enjoy it.
In this video lecture I use the “Bizarro pipe” to debug the example pipeline from RStudio’s purrr announcement.
TLDnW (too long, did not watch) summary: To debug an R magrittr pipeline using R and RStudio:
map(summary)
with map(., summary)
). The diagram above illustrates this.magrittr
pipes (“%>%
“) with Bizarro pipes (“->.;
“).You can now single step through your pipeline examining results as you go. If you hit an exception you can re-run that line again and again as the exception semantics cancel the assignment implied by the Bizarro pipe before the old value of “.
” is lost.
The “secret” to grokking the Bizarro pipe is to train your eyes to see the “->.;
” as a single atomic or indivisible glyph (ignoring the presence of “->
” and “;
“, both of which are forbidden in most style guides).
© 2021 TechTarget, Inc.
Powered by
Badges | Report an Issue | Privacy Policy | Terms of Service
Most Popular Content on DSC
To not miss this type of content in the future, subscribe to our newsletter.
Other popular resources
Archives: 2008-2014 | 2015-2016 | 2017-2019 | Book 1 | Book 2 | More
Most popular articles