[Bioc-devel] Roxygen
web working
webwork|ng @end|ng |rom po@teo@de
Thu May 9 10:10:58 CEST 2019
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
More information about the Bioc-devel
mailing list