The dplyr
R package has the %>%
operator, which is a custom infix operator. If one attaches the namespace with library(dplyr)
one c
Just import the pipe operator, by adding a line like
importFrom(magrittr, "%>%")
in your NAMESPACE
file, or if you're using roxygen2
, putting
#' @importFrom magrittr %>%
into one of your .R
files to do the same thing.
You may or may not want to export it as well. Do export it with a line like
export("%>%")
in your NAMESPACE
file or with roxygen2
#' @export
magrittr::`%>%`
if you want your users to use the pipe operator when they are using your package. Don't export it if you only need it to be available internally.