klmr / box

Write reusable, composable and modular R code

Home Page:https://klmr.me/box/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using pipe operator from dplyr with box

abiegert opened this issue · comments

Error description

I'm unsure how to use the pipe operator from dplyr within my box module. Calling box::use(dplyr[...]) fails with an error: argument "fun" is missing. Thanks in advance for your help ;-)

R version

4.0.5

‘box’ version

1.1.0

You can load the pipe for magrittr directly:

box::use(magrittr[`%>%`])

box::use(dplyr[...]) should definitely help, but you haven’t shown your code that’s trying to use the pipe operator — i.e. the code that’s causing the error ‘argument "fun" is missing’.

Alternatively, you can load just the pipe operator (instead of all of ‘dplyr’) as shown by @mrismailt. However, this won’t fix the error in using the oeprator.