diff --git a/R/Data-methods.R b/R/Data-methods.R index 26678321e..81900ca7b 100644 --- a/R/Data-methods.R +++ b/R/Data-methods.R @@ -1002,18 +1002,18 @@ setMethod( values_fill = 0 ) if (nrow(y) > 0) { - y <- y %>% - dplyr::mutate( - dplyr::across(tidyselect::matches("Cat\\d+"), \(x) x > 0) - ) %>% - dplyr::rowwise() %>% - dplyr::mutate( - AnyTox = any(dplyr::across(c(tidyselect::starts_with("Cat"), -Cat0), any)), - # Direct assignment fails on GitHub - Cat0 = !AnyTox - ) %>% - dplyr::select(-AnyTox) %>% - dplyr::ungroup() + y <- y %>% + dplyr::mutate( + dplyr::across(tidyselect::matches("Cat\\d+"), \(x) x > 0) + ) %>% + dplyr::rowwise() %>% + dplyr::mutate( + AnyTox = any(dplyr::across(c(tidyselect::starts_with("Cat"), -Cat0), any)), + # Direct assignment fails on GitHub + Cat0 = !AnyTox + ) %>% + dplyr::select(-AnyTox) %>% + dplyr::ungroup() } y <- y %>% h_tidy_class(x) y