4

With magrittr (or dplyr), I find myself using the following pattern quite often:

x <- x %>%
     fun %>%
     fun

Is there a commonly used shortcut or idiom for that? by which I mean, an operand, e.g. %^>%, with which one could write:

x %^>% fun ...
4

1 回答 1

6

我想你想要 %<>%。不过,您必须显式加载 magrittr,至少我这样做。查看cran 的参考手册(第 7 页)。

于 2015-04-19T21:01:15.193 回答