Skip to content

Commit

Permalink
Fix tidyselect issue (#72)
Browse files Browse the repository at this point in the history
* Fix tidyselect depreceted warning issue.

* Bump branch-names version

* Register cnd_df method for mutate

I noticed that were missing this `S3method(mutate,cnd_df)` in the NAMESPACE. I think we should use @export always now on methods and roxygen2 will do the right thing: see https://www.tidyverse.org/blog/2024/01/roxygen2-7-3-0/.

---------

Co-authored-by: Ramiro Magno <[email protected]>
  • Loading branch information
galachad and ramiromagno authored Jul 24, 2024
1 parent 97e408e commit a6e52d5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/r-renv-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
steps:
- name: Get branch names
id: branch-name
uses: tj-actions/branch-names@v5.4
uses: tj-actions/branch-names@v8

- name: Checkout repo (PR) 🛎
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by roxygen2: do not edit by hand

S3method(ctl_new_rowid_pillar,cnd_df)
S3method(mutate,cnd_df)
S3method(print,iso8601)
S3method(tbl_sum,cnd_df)
export("%.>%")
Expand Down
4 changes: 2 additions & 2 deletions R/cnd_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ condition_add <- function(dat, ..., .na = NA, .dat2 = rlang::env()) {
#'
#' @inheritParams dplyr::mutate
#' @importFrom dplyr mutate
#' @keywords internal
#' @export
mutate.cnd_df <- function(.data,
...,
.by = NULL,
Expand All @@ -440,5 +440,5 @@ mutate.cnd_df <- function(.data,
lst <- purrr::map(derivations, ~ rlang::expr(dplyr::if_else(!!cnd, !!.x, NA)))
lst <- rlang::set_names(lst, derived_vars)

dplyr::mutate(dat, !!!lst, .by = NULL, .keep = .keep, .after = .after)
dplyr::mutate(dat, !!!lst, .by = NULL, .keep = .keep, .after = dplyr::all_of(.after))
}
1 change: 0 additions & 1 deletion man/mutate.cnd_df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a6e52d5

Please sign in to comment.