1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-26 04:46:11 +01:00
AMR/data-raw/ex2.R

14 lines
353 B
R

ex2 <- example_isolates
for (extra_id in seq_len(50)) {
ex2 <- ex2 %>%
bind_rows(example_isolates %>% mutate(patient_id = paste0(patient_id, extra_id)))
}
# randomly clear antibibiograms of 2%
clr <- sort(sample(x = seq_len(nrow(ex2)),
size = nrow(ex2) * 0.02))
for (row in which(is.rsi(ex2))) {
ex2[clr, row] <- NA_rsi_
}