mirror of https://github.com/msberends/AMR
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
353 B
13 lines
353 B
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_ |
|
} |
|
|
|
|
|
|