powered by
Generate Poisson distributed infections. This function calculates n, the number of days between StartDate and EndDate, and returns a vector with n realizations of a Poisson(lambda) distributed random variable.
n
StartDate
EndDate
getInfectedPerDay(lambda = 4, StartDate = "2020-03-03", EndDate = "2020-06-24")
Expected number of infections/day.
Day, simulation starts
Day, simulation ends
This function returns a vector that lists the number of infections.
# NOT RUN { StartDate <- "2020-03-03" EndDate <- "2020-06-24" getInfectedPerDay(lambda = 4, StartDate = StartDate, EndDate = EndDate) # }
Run the code above in your browser using DataLab