diff --git a/DESCRIPTION b/DESCRIPTION index 46363d2..4aef5fd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -48,7 +48,7 @@ Suggests: ggplot2 VignetteBuilder: knitr Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Collate: 'class-AnchoredRanges.R' 'class-Operator.R' diff --git a/R/dplyr-groups.R b/R/dplyr-groups.R index eb6d224..7af3fce 100644 --- a/R/dplyr-groups.R +++ b/R/dplyr-groups.R @@ -158,8 +158,8 @@ group_vars.Ranges <- function(x) character(0) #' @method group_keys GroupedGenomicRanges #' @export #' @importFrom dplyr group_keys -group_keys.GroupedGenomicRanges <- function(.data, ...) { - .data@group_keys +group_keys.GroupedGenomicRanges <- function(.tbl, ...) { + .tbl@group_keys } #' @method group_keys GroupedIntegerRanges @@ -168,11 +168,11 @@ group_keys.GroupedIntegerRanges <- group_keys.GroupedGenomicRanges #' @method group_keys Ranges #' @export -group_keys.Ranges <- function(.data, ...) { +group_keys.Ranges <- function(.tbl, ...) { if (length(enquos(...)) == 0) { return(new("DFrame", nrows = 1L)) } - NextMethod(group_by(.data, ...)) + NextMethod(group_by(.tbl, ...)) } #' @method group_indices GroupedGenomicRanges @@ -228,20 +228,20 @@ group_data.Ranges <- function(.data) { #' @method group_split GroupedGenomicRanges #' @export #' @importFrom dplyr group_split -group_split.GroupedGenomicRanges <- function(.data, ..., keep = TRUE) { +group_split.GroupedGenomicRanges <- function(.tbl, ..., keep = TRUE) { if (length(enquos(...)) > 0) { warning("Ignoring arguments to `...` and using existing group structure") } - rng <- .data@delegate + rng <- .tbl@delegate if (!keep) { - vars_drop <- lapply(group_vars(.data), function(.) rlang::quo(-!!.)) + vars_drop <- lapply(group_vars(.tbl), function(.) rlang::quo(-!!.)) rng <- select(rng, !!!vars_drop) } - unname(S4Vectors::split(rng, .data@group_indices)) + unname(S4Vectors::split(rng, .tbl@group_indices)) } #' @method group_split GroupedIntegerRanges @@ -250,9 +250,9 @@ group_split.GroupedIntegerRanges <- group_split.GroupedGenomicRanges #' @method group_split Ranges #' @export -group_split.Ranges <- function(.data, ..., keep = TRUE) { +group_split.Ranges <- function(.tbl, ..., keep = TRUE) { if (length(enquos(...)) == 0) { - return(as(.data, "List")) + return(as(.tbl, "List")) } - NextMethod(group_by(.data, ...)) + NextMethod(group_by(.tbl, ...)) } \ No newline at end of file diff --git a/man/tidyverse-reexports.Rd b/man/tidyverse-reexports.Rd index d452b47..573b537 100644 --- a/man/tidyverse-reexports.Rd +++ b/man/tidyverse-reexports.Rd @@ -1,8 +1,6 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexports.R -\docType{import} -\name{reexports} -\alias{reexports} +\name{!!!} \alias{!!!} \alias{!!} \alias{\%>\%} @@ -18,17 +16,35 @@ \alias{arrange} \alias{slice} \title{Objects exported from other packages.} -\keyword{internal} -\description{ -These objects are imported from other packages. Follow the links -below to see their documentation. +\usage{ +`!!!`(x) + +`!!`(x) + +lhs \%>\% rhs + +filter(.data, ..., .by = NULL, .preserve = FALSE) + +group_by(.data, ..., .add = FALSE, .drop = group_by_drop_default(.data)) -\describe{ - \item{dplyr}{\code{\link[dplyr]{arrange}}, \code{\link[dplyr]{filter}}, \code{\link[dplyr]{group_by}}, \code{\link[dplyr:group_data]{group_vars}}, \code{\link[dplyr:group_data]{groups}}, \code{\link[dplyr]{mutate}}, \code{\link[dplyr]{select}}, \code{\link[dplyr]{slice}}, \code{\link[dplyr]{summarise}}, \code{\link[dplyr:summarise]{summarize}}, \code{\link[dplyr:group_by]{ungroup}}} +groups(x) - \item{magrittr}{\code{\link[magrittr:pipe]{\%>\%}}} +ungroup(x, ...) - \item{rlang}{\code{\link[rlang:injection-operator]{!!}}, \code{\link[rlang:splice-operator]{!!!}}} +group_vars(x) -}} +mutate(.data, ...) +select(.data, ...) + +summarise(.data, ..., .by = NULL, .groups = NULL) + +summarize(.data, ..., .by = NULL, .groups = NULL) + +arrange(.data, ..., .by_group = FALSE) + +slice(.data, ..., .by = NULL, .preserve = FALSE) +} +\description{ +Objects exported from other packages. +}