Skip to content

Commit

Permalink
Re-document & fix S3 method exports
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Sep 5, 2024
1 parent 1ed4383 commit 495d128
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Config/Needs/website: tidyverse/tidytemplate
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: {library(tidyr); list(markdown = TRUE)}
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ S3method(distinct,dtplyr_step)
S3method(do,dtplyr_step)
S3method(dt_call,dtplyr_step)
S3method(dt_call,dtplyr_step_assign)
S3method(dt_call,dtplyr_step_call)
S3method(dt_call,dtplyr_step_first)
S3method(dt_call,dtplyr_step_join)
S3method(dt_call,dtplyr_step_modify)
S3method(dt_call,dtplyr_step_mutate)
S3method(dt_call,dtplyr_step_set)
S3method(dt_call,dtplyr_step_subset)
S3method(dt_has_computation,dtplyr_step)
Expand Down
1 change: 1 addition & 0 deletions R/step-call.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ step_call <- function(parent, fun, args = list(), vars = parent$vars, in_place =
)
}

#' @export
dt_call.dtplyr_step_call <- function(x, needs_copy = x$needs_copy) {
call2(x$fun, dt_call(x$parent, needs_copy), !!!x$args)
}
Expand Down
1 change: 1 addition & 0 deletions R/step-mutate.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ step_mutate <- function(parent, new_vars = list(), use_braces = FALSE, by = new_
out
}

#' @export
dt_call.dtplyr_step_mutate <- function(x, needs_copy = x$needs_copy) {
# i is always empty because we never mutate a subset
if (is_empty(x$new_vars)) {
Expand Down

0 comments on commit 495d128

Please sign in to comment.