Assuming you are using the RStudio package, Hadley devtools and are listed by magrittr in the Importing a DESCRIPTION file section, here are the steps I took to make %>% work in my package (s) function.
First write down the function foo.R :
Secondly, run devtools::document() .
Third, run devtools::load_all() .
This file will be created in your R/ directory, and your function should work as expected.
Jubbles Jan 21 '16 at 17:21 2016-01-21 17:21
source share