1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 22:41:52 +02:00

documentation fix

This commit is contained in:
2019-05-13 20:16:51 +02:00
parent 2ea0c93e44
commit f6bf54b37d
13 changed files with 71 additions and 60 deletions

View File

@ -320,7 +320,9 @@ rsi_predict <- resistance_predict
#' @importFrom dplyr filter
#' @importFrom graphics plot axis arrows points
#' @rdname resistance_predict
plot.resistance_predict <- function(x, main = paste("Resistance prediction of", attributes(x)$ab), ...) {
plot.resistance_predict <- function(x, main = paste("Resistance Prediction of", x_name), ...) {
x_name <- paste0(ab_name(attributes(x)$ab), " (", attributes(x)$ab, ")")
if (attributes(x)$I_as_S == TRUE) {
ylab <- "%R"
} else {
@ -359,14 +361,15 @@ plot.resistance_predict <- function(x, main = paste("Resistance prediction of",
#' @importFrom dplyr filter
#' @export
ggplot_rsi_predict <- function(x,
main = paste("Resistance prediction of", attributes(x)$ab),
main = paste("Resistance Prediction of", x_name),
ribbon = TRUE,
...) {
if (!"resistance_predict" %in% class(x)) {
stop("`x` must be a resistance prediction model created with resistance_predict().")
}
x_name <- paste0(ab_name(attributes(x)$ab), " (", attributes(x)$ab, ")")
if (attributes(x)$I_as_S == TRUE) {
ylab <- "%R"
} else {