You need something like this?
example_data <- data.frame(antibiotic_type = c("ciprofloxacin", "ciprofloxacin", "doxycycline", "doxycycline", "penicillin", "penicillin", "doxycycline", "doxycycline", "penicillin", "penicillin"),
route = c("IV", "PO", "IV", "PO", "IV", "IV", "PO", "PO", "IV", "IV"))
example_data
#> antibiotic_type route
#> 1 ciprofloxacin IV
#> 2 ciprofloxacin PO
#> 3 doxycycline IV
#> 4 doxycycline PO
#> 5 penicillin IV
#> 6 penicillin IV
#> 7 doxycycline PO
#> 8 doxycycline PO
#> 9 penicillin IV
#> 10 penicillin IV
example_data$route <- ifelse(example_data$route == "PO", "", example_data$route)
example_data
#> antibiotic_type route
#> 1 ciprofloxacin IV
#> 2 ciprofloxacin
#> 3 doxycycline IV
#> 4 doxycycline
#> 5 penicillin IV
#> 6 penicillin IV
#> 7 doxycycline
#> 8 doxycycline
#> 9 penicillin IV
#> 10 penicillin IV
Created on 2023-05-10 by the reprex package (v2.0.1)