tidyverse / magrittr

Improve the readability of R code with the pipe

Home Page:https://magrittr.tidyverse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compound pipe ignored with functional sequences

moodymudskipper opened this issue · comments

I would expect that f <- . %<>% head either fails, or creates a function that modifies in place, instead it just work as if we'd call f <- . %>% head

library(magrittr)
f <- . %<>% head
x <- cars
f(cars)
#>   speed dist
#> 1     4    2
#> 2     4   10
#> 3     7    4
#> 4     7   22
#> 5     8   16
#> 6     9   10
dim(cars)
#> [1] 50  2

Created on 2019-09-27 by the reprex package (v0.3.0)