R/dplyr-slice.R

Defines functions slice.compareClusterResult slice.enrichResult

##' @method slice enrichResult
##' @export 
slice.enrichResult <- function(.data, ..., .preserve = FALSE) {
    dots <- quos(...)
    .data@result %<>% slice(!!!dots, .preserve = .preserve)
    return(.data)
}

##' @method slice gseaResult
##' @export
slice.gseaResult <- slice.enrichResult

##' @method slice compareClusterResult
##' @export 
slice.compareClusterResult <- function(.data, ..., .preserve = FALSE) {
    dots <- quos(...)
    .data@compareClusterResult %<>% slice(!!!dots, .preserve = .preserve)
    return(.data)
}
GuangchuangYu/clusterProfiler documentation built on Nov. 15, 2024, 3:05 p.m.