mo_var_found<-paste0(" based on column `",font_bold(mo),"`")
mo<-df[,mo,drop=TRUE]
}
},silent=TRUE)
}
}
if (is.null(mo)){
stop_('No information was supplied about the microorganisms (missing parameter "mo"). See ?as.rsi.\n\n',
"To transform certain columns with e.g. mutate_at(), use `data %>% mutate_at(vars(...), as.rsi, mo = .$x)`, where x is your column with microorganisms.\n",
"To tranform all MIC values in a data set, use `data %>% as.rsi()` or data %>% mutate_if(is.mic, as.rsi).",call=FALSE)
if (!is.null(df)&&!is.null(mo)&&is.data.frame(df)){
mo_var_found<-paste0(" based on column `",font_bold(mo),"`")
mo<-df[,mo,drop=TRUE]
}
},error=function(e)
stop_('No information was supplied about the microorganisms (missing parameter "mo"). See ?as.rsi.\n\n',
"To transform certain columns with e.g. mutate_at(), use `data %>% mutate_at(vars(...), as.rsi, mo = .$x)`, where x is your column with microorganisms.\n",
"To tranform all disk diffusion zones in a data set, use `data %>% as.rsi()` or data %>% mutate_if(is.disk, as.rsi).",call=FALSE)
)
}
if (length(ab)==1&&ab%like%"as.mic"){
stop_('No unambiguous name was supplied about the antibiotic (parameter "ab"). See ?as.rsi.',call=FALSE)
mo_var_found<-paste0(" based on column `",font_bold(mo),"`")
mo<-df[,mo,drop=TRUE]
}
},silent=TRUE)
}
}
if (is.null(mo)){
stop_('No information was supplied about the microorganisms (missing parameter "mo"). See ?as.rsi.\n\n',
"To transform certain columns with e.g. mutate_at(), use `data %>% mutate_at(vars(...), as.rsi, mo = .$x)`, where x is your column with microorganisms.\n",
"To tranform all disk diffusion zones in a data set, use `data %>% as.rsi()` or data %>% mutate_if(is.disk, as.rsi).",call=FALSE)
if (!is.null(df)&&!is.null(mo)&&is.data.frame(df)){
mo_var_found<-paste0(" based on column `",font_bold(mo),"`")
mo<-df[,mo,drop=TRUE]
}
},error=function(e)
stop_('No information was supplied about the microorganisms (missing parameter "mo"). See ?as.rsi.\n\n',
"To transform certain columns with e.g. mutate_at(), use `data %>% mutate_at(vars(...), as.rsi, mo = .$x)`, where x is your column with microorganisms.\n",
"To tranform all disk diffusion zones in a data set, use `data %>% as.rsi()` or data %>% mutate_if(is.disk, as.rsi).",call=FALSE)
)
}
if (length(ab)==1&&ab%like%"as.disk"){
stop_('No unambiguous name was supplied about the antibiotic (parameter "ab"). See ?as.rsi.',call=FALSE)
@ -21,6 +20,8 @@ This is the development source of the `AMR` package for R. Not a developer? Then
### How to get this package
Please see [our website](https://msberends.github.io/AMR/#get-this-package).
Bottom line: `install.packages("AMR")`
### Copyright
This R package is licensed under the [GNU General Public License (GPL) v2.0](https://github.com/msberends/AMR/blob/master/LICENSE). In a nutshell, this means that this package: