Hi Tobias, I believe that you are just missing the " This should work:
#' @importFrom dplyr "%>%" You might also consider using this: https://www.rdocumentation.org/packages/usethis/versions/1.5.0/topics/use_pipe Best, Marc On 09/05/2019, 10:11, "Bioc-devel on behalf of web working" <bioc-devel-boun...@r-project.org on behalf of webwork...@posteo.de> wrote: Hi together, I am struggling a bit with the roxygen function import. Do you know how to add the dplyr %>% functionality to a function without importing the hole dplyr package? This is my current solution: #' Return first 10 entries #' #' @param mtcars a \code{data.frame} object #' #' @import dplyr #' @return a \code{data.frame} with first 10 entries #' @export #' #' @examples #' fancyFunction(mtcars) fancyFunction <- function(mtcars){ output <- mtcars %>% head(10) return(output) } This is how I would like to have it: #' Return first 10 entries #' #' @param mtcars a \code{data.frame} object #' #' @importFrom dplyr %>% #' @return a \code{data.frame} with first 10 entries #' @export #' #' @examples #' fancyFunction(mtcars) fancyFunction <- function(mtcars){ output <- mtcars %>% head(10) return(output) } Do you have any idea how to deal with this problem? Best Tobias _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel ------------------------------------------------------------------------------ De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. Het Universitair Medisch Centrum Utrecht is een publiekrechtelijke rechtspersoon in de zin van de W.H.W. (Wet Hoger Onderwijs en Wetenschappelijk Onderzoek) en staat geregistreerd bij de Kamer van Koophandel voor Midden-Nederland onder nr. 30244197. Denk s.v.p aan het milieu voor u deze e-mail afdrukt. ------------------------------------------------------------------------------ This message may contain confidential information and is intended exclusively for the addressee. If you receive this message unintentionally, please do not use the contents but notify the sender immediately by return e-mail. University Medical Center Utrecht is a legal person by public law and is registered at the Chamber of Commerce for Midden-Nederland under no. 30244197. Please consider the environment before printing this e-mail. _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel