1

There same commands in R packages.

I already use %>% in my R markdown script. And today I newly install dplyr package in rstudio.
Then I notice there are 3 %>% in my rstudio, maybe will cause strange problem.

dplyr::%>%          # Objects exported from other packages
magrittr::%>%       # magrittr forward-pipe operator
stringr::%>%        # Pipe operator

How to solve it?

Sotos
  • 51,121
  • 6
  • 32
  • 66
kittygirl
  • 2,255
  • 5
  • 24
  • 52
  • Have you had any problems with that? I don't think you need to do anything about it since they all do the same afaik. – talat Jun 14 '17 at 13:27
  • 3
    Don't think it'll be a problem. If you check the documentation for all of them, they all act the same way. Specifically, `dplyr::%<%` explicitly says it imports from `magrittr::%<%`. Looking at the source code all of them are exactly the same. – Mike H. Jun 14 '17 at 13:28
  • That's really a problem. you can find may other example like `outlier`. you should notice from `outlier` package and `psych` package. that's different function. – kittygirl Jun 14 '17 at 13:48
  • Can you specifically say where those packages have their own version of `%>%`? I can't seem to find it – Mike H. Jun 14 '17 at 13:55
  • More formal comparison is: `identical(dplyr::"%>%",magrittr::"%>%"); identical(dplyr::"%>%",stringr::"%>%")`. Shows that all of these are identical to each other – Mike H. Jun 14 '17 at 14:04
  • Because you seem to wander in the `tidyverse`, you may also read [here](https://blog.rstudio.org/2016/09/15/tidyverse-1-0-0/) about conflicts with other packages, and check the [`tidyverse_conflicts` function](https://www.rdocumentation.org/packages/tidyverse/versions/1.0.0/topics/tidyverse_conflicts). Quite a few have been bitten by this... – Henrik Jun 14 '17 at 14:07

0 Answers0