Skip to content
Merged

Dev #206

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ importFrom(rlang,is_spliced)
importFrom(rlang,quo_is_missing)
importFrom(rlang,quo_is_null)
importFrom(rlang,quo_is_symbol)
importFrom(rlang,quo_is_symbolic)
importFrom(rlang,quo_name)
importFrom(rlang,quo_squash)
importFrom(scales,extended_breaks)
Expand Down
56 changes: 28 additions & 28 deletions R/dplyr_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,25 @@
#' individual methods for extra arguments and differences in behaviour.
#'
#' The following methods are currently available in loaded packages:
#'
#'
#' @param .data A data frame, data frame extension (e.g. a tibble), or a
#' lazy data frame (e.g. from dbplyr or dtplyr). See *Methods*, below, for
#' more details.
#' @param ... <[`tidy-eval`][dplyr_tidy_eval]> Variables, or functions or
#' variables. Use [desc()] to sort a variable in descending order.
#' @param .by_group If TRUE, will sort first by grouping variable. Applies to grouped data frames only.
#'
#'
#' @return A tibble
#' @family single table verbs
#'
#'
#' @rdname arrange-methods
#' @name arrange
#' @importFrom dplyr arrange
#'
#'
#' @examples
#' `%>%` = magrittr::`%>%`
#'
#' arrange(mtcars, cyl, disp)
#'
#'
#' @export
NULL

Expand Down Expand Up @@ -101,10 +101,10 @@ arrange.tidybulk <- function(.data, ..., .by_group = FALSE) {
#' used instead.
#' @return `bind_rows()` and `bind_cols()` return the same type as
#' the first input, either a data frame, `tbl_df`, or `grouped_df`.
#'
#'
#'
#'
#' @examples
#' `%>%` = magrittr::`%>%`
#'
#' one <- mtcars[1:4, ]
#' two <- mtcars[11:14, ]
#'
Expand All @@ -116,9 +116,9 @@ arrange.tidybulk <- function(.data, ..., .by_group = FALSE) {
NULL

#' @rdname bind-methods
#'
#'
#' @inheritParams bind
#'
#'
#' @export
#'
bind_rows <- function(..., .id = NULL) {
Expand All @@ -134,9 +134,9 @@ bind_rows.default <- function(..., .id = NULL)
#' @importFrom rlang dots_values
#' @importFrom rlang flatten_if
#' @importFrom rlang is_spliced
#'
#'
#' @export
#'
#'
bind_rows.tidybulk <- function(..., .id = NULL)
{

Expand All @@ -156,9 +156,9 @@ bind_rows.tidybulk <- function(..., .id = NULL)
}

#' @export
#'
#'
#' @inheritParams bind
#'
#'
#' @rdname bind-methods
bind_cols <- function(..., .id = NULL) {
UseMethod("bind_cols")
Expand All @@ -173,9 +173,9 @@ bind_cols.default <- function(..., .id = NULL)
#' @importFrom rlang dots_values
#' @importFrom rlang flatten_if
#' @importFrom rlang is_spliced
#'
#'
#' @export
#'
#'
bind_cols.tidybulk <- function(..., .id = NULL)
{

Expand All @@ -198,7 +198,7 @@ bind_cols.tidybulk <- function(..., .id = NULL)
#' @rdname distinct-methods
#' @name distinct
#' @importFrom dplyr distinct
#'
#'
#' @examples
#'
#' tidybulk::se_mini %>% tidybulk() %>% distinct()
Expand Down Expand Up @@ -276,11 +276,11 @@ distinct.tidybulk <- function (.data, ..., .keep_all = FALSE)
#'
#' The following methods are currently available in loaded packages:
#' @seealso [filter_all()], [filter_if()] and [filter_at()].
#'
#'
#' @rdname filter-methods
#' @name filter
#' @importFrom dplyr filter
#'
#'
#' @export
#' @examples
#'
Expand Down Expand Up @@ -365,10 +365,10 @@ group_by.tidybulk <- function (.data, ..., .add = FALSE, .drop = group_by_drop_d
#' @rdname ungroup-methods
#' @name ungroup
#' @importFrom dplyr ungroup
#'
#'
#' @param x A [tbl()]
#' @param ... See dplyr
#'
#'
#' @export
ungroup.tidybulk <- function (x, ...)
{
Expand Down Expand Up @@ -591,15 +591,15 @@ mutate.nested_tidybulk <- function(.data, ...)
.data %>%
drop_class(c("nested_tidybulk", "tt")) %>%
dplyr::mutate(...) %>%

# Attach attributes
reattach_internals(.data) %>%

# Add class
add_class("tt") %>%
add_class("nested_tidybulk")


}

#' Rename columns
Expand Down Expand Up @@ -632,7 +632,7 @@ mutate.nested_tidybulk <- function(.data, ...)
#' `%>%` = magrittr::`%>%`
#' iris <- as_tibble(iris) # so it prints a little nicer
#' rename(iris, petal_length = Petal.Length)
#'
#'
#' @rdname rename-methods
#' @name rename
#' @importFrom dplyr rename
Expand Down Expand Up @@ -685,7 +685,7 @@ rename.tidybulk <- function(.data, ...)
#' `%>%` = magrittr::`%>%`
#' df <- expand.grid(x = 1:3, y = 3:1)
#' df_done <- df %>% rowwise() %>% do(i = seq(.$x, .$y))
#'
#'
#' @rdname rowwise-methods
#' @name rowwise
#' @importFrom dplyr rowwise
Expand Down
Loading