From cc5ad17fb1af6745d11f4c9ae4f0f2f2a99f1fc3 Mon Sep 17 00:00:00 2001 From: Adam Forys Date: Wed, 24 Jul 2024 23:05:54 +0200 Subject: [PATCH 1/3] Fix tidyselect depreceted warning issue. --- R/cnd_df.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/cnd_df.R b/R/cnd_df.R index 9d3dedb9..585639d2 100644 --- a/R/cnd_df.R +++ b/R/cnd_df.R @@ -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)) } From 4a8b6a190c2cef298faa04cc8d8981f14fcf769e Mon Sep 17 00:00:00 2001 From: Adam Forys Date: Wed, 24 Jul 2024 23:07:43 +0200 Subject: [PATCH 2/3] Bump branch-names version --- .github/workflows/r-renv-lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r-renv-lock.yml b/.github/workflows/r-renv-lock.yml index 44142a3d..1eff1f70 100644 --- a/.github/workflows/r-renv-lock.yml +++ b/.github/workflows/r-renv-lock.yml @@ -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 From d6e3d92198ee9684dfb6f9d5c1f00b5408b93320 Mon Sep 17 00:00:00 2001 From: Ramiro Magno Date: Wed, 24 Jul 2024 22:34:56 +0100 Subject: [PATCH 3/3] 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/. --- NAMESPACE | 1 + R/cnd_df.R | 2 +- man/mutate.cnd_df.Rd | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index ae0b7a9d..7414dfc1 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -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("%.>%") diff --git a/R/cnd_df.R b/R/cnd_df.R index 585639d2..4a80a222 100644 --- a/R/cnd_df.R +++ b/R/cnd_df.R @@ -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, diff --git a/man/mutate.cnd_df.Rd b/man/mutate.cnd_df.Rd index a11b38fd..29b1d4fc 100644 --- a/man/mutate.cnd_df.Rd +++ b/man/mutate.cnd_df.Rd @@ -65,4 +65,3 @@ cnd_df <- condition_add(df, x > 1L, y \%in\% c("a", "b")) dplyr::mutate(cnd_df, z = "match") } -\keyword{internal}