You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Submitted by: john eckstein
Assigned to: Joshua Ulrich R-Forge link
I have data which I pass through to.monthly with the goal of selecting the last data of the month. Sometimes the original data is of monthly periodicity, so in this case its just for convenience in aligning disparate data. When the only data point in a month is the first day of the month, to.monthly aligns on the last day of the previous month, causing nasty bugs. here is an example:
I have a workaround but it seems like this is something that should be fixed.
I am working on windows 7, R 2.15.2, xts 0.9-3
Followups:
Date: 2013-04-22 02:04
Sender: Garrett See
This is a timezone issue. Essentially, it is doing the following, then extracting the month and adding 1 to it.
Submitted by: john eckstein
Assigned to: Joshua Ulrich
R-Forge link
I have data which I pass through to.monthly with the goal of selecting the last data of the month. Sometimes the original data is of monthly periodicity, so in this case its just for convenience in aligning disparate data. When the only data point in a month is the first day of the month, to.monthly aligns on the last day of the previous month, causing nasty bugs. here is an example:
y <- xts(1:4, order.by=as.Date(c('2001-07-02', '2001-08-01', '2001-09-03', '2001-10-01')))
y.monthends <- to.monthly(y[,1], indexAt='lastof')[,4]
y.monthends then contains:
y[, 1].Close
2001-07-31 1
2001-07-31 2
2001-09-30 3
2001-09-30 4
I have a workaround but it seems like this is something that should be fixed.
I am working on windows 7, R 2.15.2, xts 0.9-3
Followups:
Date: 2013-04-22 02:04
Sender: Garrett See
This is a timezone issue. Essentially, it is doing the following, then extracting the month and adding 1 to it.
It should work as expected if the as.POSIXlt call used the indexTZ of the input. e.g.
I submitted a possible patch: https://r-forge.r-project.org/tracker/index.php?func=detail&aid=2710&group_id=118&atid=518
The text was updated successfully, but these errors were encountered: