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 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 9d3dedb9..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, @@ -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)) } 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}