Truncates one or more ATC codes to the given number of characters, corresponding to the desired ATC classification level (e.g., anatomical main group, therapeutic subgroup, chemical substance).
Examples
atc_convert("A01AA01", level = 3)
#> [1] "A01"
atc_convert(c("B02BA02", "C03CA01"), level = 5)
#> [1] "B02BA" "C03CA"