logoalt Hacker News

Plumbers, chains, and famous painters: The history of the pipe operator in R

51 points • by sinnsro • last Friday at 11:20 AM • 3 comments • view on HN

Comments

MostlyStable • today at 8:51 PM

I had always wondered about the magrittr package name, but never enough to actually go find out. That's a cool origin.

wwfn • today at 2:27 PM

I only recently discovered \(x) like function wrapping is not required! Where magrittr::%>% uses ., base R's |> can use _, but only for named arguments

     penguins |>
      rpart::rpart(species ~ ., method = "class", data = _) |>
      rpart.plot::prp(extra = 4)
EDIT: maybe that wasn't the case in 2021 when the blog post was written
fithisux • today at 2:23 PM

Refreshing to see such articles.