rafalab / excessmort

R package for estimating excess deaths from daily count data
20 stars 3 forks source link

expected_plot() returns an error when compute_expected(..., keep.components = TRUE). #3

Open mkiang opened 3 years ago

mkiang commented 3 years ago

Not sure if this is expected behavior, but when using expected_plot(), I will get an error (Error in if (!attr(expected, "frequency") %in% c(365, 52)) warning("This function assumes weekly or daily data. This dataset has ", : argument is of length zero) if the object comes from compute_expected(..., keep.components = TRUE) but not if keep.components = FALSE despite all other parameters (and data) being identical.

If expected behavior, I think a more descriptive error would be helpful?