plot.incidence()now reverts to the previous behaviour of plotting ticks on either side of the interval as opposed to centering within the interval.
plot.incidence()introduced with new release of ggplot2 (bug report) As a temporary fix, dates are now centered within the interval instead of to the left of the interval.
seq.Date()can handle (e.g. "5 weeks") can be handled by
$weeksis now added to the incidence object, which contains an "aweek" class
make_breaks()will automatically calculate breaks from an incidence object for plotting.
scale_x_incidence()will produce a ggplot2 "ScaleContinuous" object to add to a ggplot.
labels_isois deprecated in favor of
$isoweeksif the weeks are ISO 8601 standard, but users should rely intead on
$isoweekselement will be removed in a future version of incidence.
isoweekshas been deprecated in favour of
incidence()will no longer allow a non-standard
standard = TRUE. The first call toincidence()
will issue a warning. To use non-standard first dates, specifystandard = FALSE
. To remove the warning, useoptions(incidence.warn.first_date = FALSE)`. See https://github.com/reconhub/incidence/issues/87 for details.
citation("incidence")will now give the proper citation for our article in F1000 research and the global DOI for archived code. See https://github.com/reconhub/incidence/pulls/106
incidence()now returns an error when supplied a character vector that is not formatted as (yyyy-mm-dd). (See https://github.com/reconhub/incidence/issues/88)
fit()now returns correct coefficients when dates is POSIXt by converting to Date. (See https://github.com/reconhub/incidence/issues/91)
plot.incidence()now plots in UTC by default for POSIXt incidence objects. this prevents a bug where different time zones would cause a shift in the bars (See https://github.com/reconhub/incidence/issues/99).
plot.incidence()will now respect single groups. (See https://github.com/reconhub/incidence/issues/84)
as.data.frame.incidence()will now respect single groups. (See https://github.com/reconhub/incidence/issues/84)
demo("incidence-demo" package = "incidence")has been updated to show use of custom colors.
print.incidence()will now print isoweeks even if the
$intervalelement is "week".
subset.incidence()will now give a more informative error message when the user specifies a group that does not exist.
demo('incidence-demo', package = 'incidence')now shows plotting with
show_cases = TRUE.
as.data.frame.incidence()For details, see https://github.com/reconhub/incidence/issues/79
group_names()allows the user to retrieve and set the group names.
ncol()are now available for incidence objects, returning the dimensions of the number of bins and the number of groups.
show_caseshas been added to draw borders around individual cases for EPIET-style curves. See https://github.com/reconhub/incidence/pull/72 for details.
estimate_peak()no longer fails with integer dates
incidence()no longer fails when providing both group information and a
last_dateparameter that is inside the bounds of the observed dates. Thanks to @mfaber for reporting this bug. See https://github.com/reconhub/incidence/issues/70 for details.
internal_checks.Rfile has been split into the relative components.
$lmfield of the
incidence_fitclass is now named
$modelto clearly indicate that this can contain any model.
incidence() will now accept text-based intervals that are valid date
intervals: day, week, month, quarter, and year.
incidence() now verifies that all user-supplied arguments are accurate
and spelled correctly.
fit_optim_split() now gains a
separate_split argument that will determine
the optimal split separately for groups.
A new class,
incidence_fit_list, has been implemented to store and summarise
incidence_fit objects within a nested list. This is the class returned by
$fit element of
bootstrap() will bootstrap epicurves stored as
find_peak() identifies the peak date of an
estimate_peak() uses bootstrap to estimate the peak time of a
partially observed outbreak.
get_interval() will return the numeric interval or several
intervals in the case of intervals that can't be represented in a fixed
number of days (e.g. months).
get_dates() returns the dates or counts of days on the right,
center, or left of the interval.
get_counts() returns the matrix of case counts for each date.
get_fit() returns a list of
incidence_fit objects from an
get_info() returns information stored in the
$info element of an
incidence_fit_classinstructs the user on how
incidence_fit_listobjects are created and accessed.
iso_weekparameter is deprecated in favor of
standardfor a more general way of indicating that the interval should start at the beginning of a valid date timeframe.
$timespan item in the incidence object from Dates was not type-stable
and would change if subsetted. A re-working of the incidence constructor
fixed this issue.
Misspelled or unrecgonized parameters passed to
incidence() will now cause
an error instead of being silently ignored.
Plotting for POSIXct data has been fixed.
incidenceobject to avoid conflicts with additional geoms such as
geom_ribbon, now used in
n_breaks has been added to
plot.incidence, to specify the
ideal number of breaks for the date legends; will work with ggplot2 > 2.2.1
added the internal function
make_iso_weeks_breaks to generate dates and
labels for date x-axis legends using ISO weeks
added a function
add_incidence_fit, which can be used for adding fits to
epicurves in a piping-friendly way
added a function
cumulate, which computes cumulative incidence and returns
new generic as.incidence, to create incidence objects from already computed incidences. Methods for: matrix, data.frame, numeric vectors
better processing of input dates, including: automatic conversion from characters, issuing errors for factors, and silently converting numeric vectors which are essentially integers (issuing a warning otherwise)
new vignette on conversions to and from incidence objects
fixed issues caused by variables which changed names in some datasets of the outbreaks package, used in the documentation
disabled by default the isoweeks in
incidence; this part of the code will
break with changes made in the devel version of ggplot2, which is now
required by plotly
it is now possible to subset an incidence object based on
Date dates using
numeric values, which are interpreted as number of intervals since the first
date (origin = 1)
NAs are no longer removed from the input dates, as it would cause mismatches with grouping factors.
add an argument
iso_week to incidence.Date() and incidence.POSIXt() to
support ISO week-based incidence when computing weekly incidence.
add an argument
labels_iso_week to plot.incidence() to label x axis tick
marks with ISO weeks when plotting ISO week-based weekly incidence.
The README.Rmd / README.md now contains information about various websites for incidence as well as guidelines for posting questions on the RECON forum.
incidence now has a dedicated website https://www.repidemicsconsortium.org/incidence/ generated with pkgdown
First release of the incidence package on CRAN!
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.