I am trying to create an R package from scripts using RStudio and Devtools and trying to follow advice from Hadley Wickam's Package book.
One of the functions in my package (located at a ./R/fuctions.R) contains the piping operator (%>%), as well as other dplyr functions. However, after loading the functions, devtools::load_all(), and trying to test the function I get the following error:
Error in function_name(2014) : could not find function "%>%"
I already included the dependencies for dplyr and magrittr in both, DEPENDENCIES and NAMESPECE as in:
DESCRIPTION
Imports:
dplyr,
magrittr
NAMESPACE
#' @import dplyr
#' @import magrittr)
How can I make "%>%" work within a package?