Skip to content

Commit 5e82ff9

Browse files
committed
Replace select(-c(col)) with select(-all_of(col))
1 parent 906cd5c commit 5e82ff9

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* New functions `mcmc_dots` and `mcmc_dots_by_chain` for dot plots of MCMC draws by @behramulukir (#402)
1212
* Default to `quantiles=100` for all dot plots by @behramulukir (#402)
1313
* Use `"neff_ratio"` consistently in diagnostic color scale helpers to avoid relying on partial matching of `"neff"`.
14+
* Replace deprecated `select(-c("col"))` with `select(-all_of("col"))` in `mcmc-intervals.R` to avoid dplyr warnings.
1415

1516
# bayesplot 1.15.0
1617

R/mcmc-intervals.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ mcmc_areas_data <- function(x,
756756
interval_width = 0,
757757
interval = "point"
758758
) %>%
759-
select(-c("center"), "m") %>%
759+
select(-all_of("center"), all_of("m")) %>%
760760
ungroup()
761761

762762
# Ignore points calculcation if no point estimate was requested
@@ -842,7 +842,7 @@ compute_column_density <- function(df, group_vars, value_var, ...) {
842842
reconstructed <- as.list(seq_len(nrow(nested)))
843843
for (df_i in seq_along(nested$density)) {
844844
row <- nested[df_i, ]
845-
parent <- row %>% select(-c("density"))
845+
parent <- row %>% select(-all_of("density"))
846846
groups <- rep(list(parent), nrow(row$density[[1]])) %>% dplyr::bind_rows()
847847

848848
reconstructed[[df_i]] <- dplyr::bind_cols(groups, row$density[[1]])

0 commit comments

Comments
 (0)