Only mention determination of mo column once in dplyr groups
msberends opened this issue · comments
Matthijs Berends commented
Notice how "Using column 'mo' as input for mo_name()
" is mentioned 4 times, the number of the groups:
library(AMR)
library(dplyr)
example_isolates |> group_by(hospital_id) |> transmute(name = mo_name())
#> ℹ Using column 'mo' as input for `mo_name()`
#> ℹ Using column 'mo' as input for `mo_name()`
#> ℹ Using column 'mo' as input for `mo_name()`
#> ℹ Using column 'mo' as input for `mo_name()`
#> # A tibble: 2,000 × 2
#> # Groups: hospital_id [4]
#> hospital_id name
#> <fct> <chr>
#> 1 D Escherichia coli
#> 2 D Escherichia coli
#> 3 B Staphylococcus epidermidis
#> 4 B Staphylococcus epidermidis
#> 5 B Staphylococcus epidermidis
#> 6 B Staphylococcus epidermidis
#> 7 D Staphylococcus aureus
#> 8 D Staphylococcus aureus
#> 9 B Staphylococcus epidermidis
#> 10 B Staphylococcus epidermidis
#> # … with 1,990 more rows
#> # ℹ Use `print(n = ...)` to see more rows
Created on 2022-08-08 by the reprex package (v2.0.1)
Matthijs Berends commented
Fixed in #71