extendRki | R Documentation |
Combine existing data with synthetic data
extendRki( data = getRkiData(babsim.hospital::rkidata), EndDate = max(data$Day) + 28, R0 = c(1, 1), tau = 5 )
data |
rki data, e.g., |
EndDate |
Ende (Tag), e.g., |
R0 |
Basisreproduktionszahl. Constant, if a scalar value is given.
If a vector of two values are given, they will be interpreted as
a start and an end value, respectively. |
tau |
Ansteckungszeitraum in Tagen |
getRkiData
# take 10,000 data points only: data <- getRkiData(babsim.hospital::rkidata[1:10000, ]) # check whether enough data are provided if (dim(data)[1] > 1e6){ n <- as.integer(max(data$Day) - min(data$Day)) StartDay <- min(data$Day) + round(n * 0.995) data <- data[which(data$Day >= StartDay), ] EndDate <- max(data$Day) + 2 dataExt <- extendRki( data = data, EndDate = EndDate, R0 = c(0.1, 0.2) ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.