I updated to 2023.03.1 Build 446, yesterday and found a few changes I needed to make to my code.
### the first was the count function, I changed it from.
mutate(count = n() to
mutate(count = dplyr::n()
### he second is, and I don't understand why is the across function.
mutate(across(starts_with("tr_sp_c"), round, 2))
the error I get is,
Error in mutate()
:
In argument:
across(starts_with("tr_sp_c"), round, 2)
.
Caused by error in across()
:
! across()
can only work inside of tidytable verbs
Backtrace:
▆
- ├─... %>% mutate(across(starts_with("tr_sp_c"), round, 2))
- ├─dplyr::mutate(., across(starts_with("tr_sp_c"), round, 2))
- ├─dplyr:::mutate.data.frame(., across(starts_with("tr_sp_c"), round, 2))
- │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
- │ ├─base::withCallingHandlers(...)
- │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
- │ └─mask$eval_all_mutate(quo)
- │ └─dplyr (local) eval()
- └─tidytable::across(starts_with("tr_sp_c"), round, 2)
I don't really understand why across isn't working like it had previously worked.
Were there major changes made in the new rstudio build. seems odd that the same code is now redundant for mine.