r - Magrittr functions - how to package them? -


i have 2 related questions writing functions in magrittr package & including them in package.

in normal way of writing function, can specify library(package.a) within function call if of steps uses function package.a. how call in pipe environment (from magrittr)?

this part of question arose when tried package functions, , few of functions use magrittr's way of creating functions. wasn't able add functions package. devtools package's combine function didn't recognize %>% pipe. had re-write them normal functions include them in package. how overcome this?

update namespace file, see 1.5 package namespaces.
add import(magrittr), don't forget add imports: magrittr in description file.

regarding comment on ::.
while importing magrittr exported function using import(magrittr) don't have use :: operator point package.
of course long did not create function same name in package override name imported package, need ::.
:: needed if used importfrom() instead of import() , did not import required function - might not recommended anyway.
case may want use :: when use suggests or enhances, none of them in scope of question anyway.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -