Closed angryjinyan closed 4 years ago
This was reported in #119 and was found to be caused by the new version of ggplot2 (there is an issue open for this over there). A workaround centering the dates on the bars has been added to the current GitHub version, but it hasn't yet been submitted to CRAN.
You can install the most recent version with remotes::install_github("reconhub/incidence")
Thanks for the help! After installed the latest version, it works now!
I'll try to get the patch up to github soon!
Note: this will be fixed when ggplot2 3.3.2 comes out (see #126)
I followed the instructions on https://www.repidemicsconsortium.org/incidence/ with the following code: `library(outbreaks) library(ggplot2) library(incidence)
dat <- ebola_sim$linelist$date_of_onset class(dat)
head(dat) i.7 <- incidence(dat, interval = 7) i.7 plot(i.7)`
The desired output should be
However, I get a plot like this:
And also a warning message:
position_stack requires non-overlapping x intervals
I have no idea what's happened. Is this something this library need to fix or I'm getting some libraries' version wrong?