Attaching package: 'dplyr' The following objects are masked from 'package:stats': filter, lag The following objects are masked from 'package:base': intersect, setdiff, setequal, union Error in `group_by()`: ! Must group by variables found in `.data`. ✖ Column `TRTA` is not found. Backtrace: ▆ 1. ├─... %>% mutate(pct = round(100 * n / N, 1)) 2. ├─dplyr::mutate(., pct = round(100 * n/N, 1)) 3. ├─dplyr::left_join(., adsl %>% count(TRT01A, name = "N"), by = c(TRTA = "TRT01A")) 4. ├─dplyr::summarise(., n = n_distinct(USUBJID), .groups = "drop") 5. ├─dplyr::group_by(., TRTA, AEBODSYS, AEDECOD) 6. └─dplyr:::group_by.data.frame(., TRTA, AEBODSYS, AEDECOD) 7. └─dplyr::group_by_prepare(.data, ..., .add = .add, error_call = current_env()) 8. └─rlang::abort(bullets, call = error_call) Execution halted