Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

as_sts() for IncidenceMatri should have correct start date #25

Open
nickreich opened this issue Jul 14, 2018 · 0 comments
Open

as_sts() for IncidenceMatri should have correct start date #25

nickreich opened this issue Jul 14, 2018 · 0 comments

Comments

@nickreich
Copy link

I think the default time is getting passed to it as a start time, see the following example:

> dat <- read.csv('data/province-biweek-counts.csv')
> inc <- IncidenceMatrix$new(1+reshape2::acast(dat,province~date_sick,value.var='cases'))
> inc$as_sts()
-- An object of class sts -- 
freq:		 52 
start:		 2000 1 
dim(observed):	 208 77
...

note the start of 2000 1 which is the default for sts objects. As this is explicitly not the start of the timeseries:

> reshape2::acast(dat,province~date_sick,value.var='cases')
   2006-01-01 2006-01-15 2006-01-29 2006-02-12 2006-02-26 2006-03-12 2006-03-26 2006-04-09 2006-04-23
10        265        162        211        113        165        146        137        117         74
11         27         30         37         37         35         32         29         32         24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant