Skip to content

Commit

Permalink
Replace superseded function rename_at
Browse files Browse the repository at this point in the history
  • Loading branch information
damianooldoni committed Jun 9, 2022
1 parent 36f8b0e commit 1c1e2be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/indicator_introduction_year.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ indicator_introduction_year <- function(df,
# Rename to default column name
df <-
df %>%
dplyr::rename_at(vars(first_observed), ~"first_observed") %>%
dplyr::rename_at(vars(taxon_key_col), ~"key")
dplyr::rename_with(.fn = ~"first_observed", .cols = one_of(first_observed)) %>%
dplyr::rename_with(.fn = ~"key", .cols= one_of(taxon_key_col))

# Provide warning messages for first_observed NA values
n_first_observed_not_present <-
Expand Down
4 changes: 2 additions & 2 deletions R/indicator_total_year.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ indicator_total_year <- function(df, start_year_plot = 1940,
# rename to default column name
df <-
df %>%
rename_at(vars(first_observed), ~"first_observed") %>%
rename_at(vars(taxon_key_col), ~"key")
dplyr::rename_with(.fn = ~"first_observed", .cols = one_of(first_observed)) %>%
dplyr::rename_with(.fn = ~"key", .cols= one_of(taxon_key_col))

# Provide warning messages for first_observed NA values
n_first_observed_not_present <-
Expand Down

0 comments on commit 1c1e2be

Please sign in to comment.