1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-13 05:21:50 +02:00

Replace RSI with SIR

This commit is contained in:
Dr. Matthijs Berends
2023-01-21 23:47:20 +01:00
committed by GitHub
parent 24b12024ce
commit 98e62c9af2
127 changed files with 1746 additions and 1648 deletions

View File

@ -111,16 +111,16 @@ example_isolates %>%
For another example, I will create a data set to determine multi-drug resistant TB:
```{r}
# random_rsi() is a helper function to generate
# random_sir() is a helper function to generate
# a random vector with values S, I and R
my_TB_data <- data.frame(
rifampicin = random_rsi(5000),
isoniazid = random_rsi(5000),
gatifloxacin = random_rsi(5000),
ethambutol = random_rsi(5000),
pyrazinamide = random_rsi(5000),
moxifloxacin = random_rsi(5000),
kanamycin = random_rsi(5000)
rifampicin = random_sir(5000),
isoniazid = random_sir(5000),
gatifloxacin = random_sir(5000),
ethambutol = random_sir(5000),
pyrazinamide = random_sir(5000),
moxifloxacin = random_sir(5000),
kanamycin = random_sir(5000)
)
```
@ -128,13 +128,13 @@ Because all column names are automatically verified for valid drug names or code
```{r, eval = FALSE}
my_TB_data <- data.frame(
RIF = random_rsi(5000),
INH = random_rsi(5000),
GAT = random_rsi(5000),
ETH = random_rsi(5000),
PZA = random_rsi(5000),
MFX = random_rsi(5000),
KAN = random_rsi(5000)
RIF = random_sir(5000),
INH = random_sir(5000),
GAT = random_sir(5000),
ETH = random_sir(5000),
PZA = random_sir(5000),
MFX = random_sir(5000),
KAN = random_sir(5000)
)
```