7 ms·
The tidyverse folks in R have been using that for a while: https://magrittr.tidyverse.org/reference/pipe.html https://magrittr.tidyverse.org/reference/pipe.html
by SimonDorfman 1y ago
The tidyverse folks in R have been using that for a while: https://magrittr.tidyverse.org/reference/pipe.html https://magrittr.tidyverse.org/reference/pipe.html
- flobosg 1y agoBase R as well: |> was implemented as a pipe operator in 4.1.0.
- tylermw 1y agoImportantly, the base R pipe implements the operation at the language parsing level, so it has basically zero overhead.
- zelphirkalt 1y agoI would assume, that most languages do that, or alternatively have a compiler, that is smart enough to ensure there is no actual overhead in the compiled code.
- madcaptenor 1y agoAnd base R has had a pipe for a couple years now, although there are some differences between base R's |> and tidyverse's %>%: https://www.tidyverse.org/blog/2023/04/base-vs-magrittr-pipe/ https://www.tidyverse.org/blog/2023/04/base-vs-magrittr-pipe...
- thom 1y agoI've always found magrittr mildly hilarious. R has vestigial Lisp DNA, but somehow the R implementation of pipes was incredibly long, complex and produced stack traces, so it moved to a native C implementation, which nevertheless has to manipulate the SEXPs that secretly underlie the language. Compared to something like Clojure's threading macros it's wild how much work is needed.
- steine65 1y agoR, specifically tidyverse, has a special place in my heart. Tidy principles makes data analysis easy to read and easy to use new functions, since there are standards that must be met to call a function "tidy." Recently I started using Nushell, which feels very similar.
- mvieira38 1y agoR + tidyverse is the gold standard for working with data quickly in a readable and maintainable way, IMO. It's just absolutely seamless. Shoutout to tidyverts (https://tidyverts.org/ https://tidyverts.org/) for working with time series, too