mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 00:43:00 +02:00
bind_rows
This commit is contained in:
6
R/plot.R
6
R/plot.R
@ -585,17 +585,17 @@ plot.sir <- function(x,
|
||||
data$s <- round((data$n / sum(data$n)) * 100, 1)
|
||||
|
||||
if (!"S" %in% data$x) {
|
||||
data <- rbind(data, data.frame(x = "S", n = 0, s = 0, stringsAsFactors = FALSE),
|
||||
data <- bind_rows2(data, data.frame(x = "S", n = 0, s = 0, stringsAsFactors = FALSE),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
}
|
||||
if (!"I" %in% data$x) {
|
||||
data <- rbind(data, data.frame(x = "I", n = 0, s = 0, stringsAsFactors = FALSE),
|
||||
data <- bind_rows2(data, data.frame(x = "I", n = 0, s = 0, stringsAsFactors = FALSE),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
}
|
||||
if (!"R" %in% data$x) {
|
||||
data <- rbind(data, data.frame(x = "R", n = 0, s = 0, stringsAsFactors = FALSE),
|
||||
data <- bind_rows2(data, data.frame(x = "R", n = 0, s = 0, stringsAsFactors = FALSE),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user