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
I just updated to the latest revision of 1.9.7 and it looks like rolling joins aren't working correctly. Here's an example on 1.9.7:
library(data.table)
library(zoo)
library(lubridate)
mydates <- data.table(yearmon=as.yearmon(2000+2/12+seq(0,1,by=3/12)))
othervals <- data.table(date=mdy("12301999")+months(seq(0,24,by=6)))
othervals[,yearmon:=as.yearmon(date)]
setkey(othervals,yearmon)
setkey(mydates,yearmon)
othervals[mydates,roll=TRUE]
othervals[mydates,roll=1/12]
> othervals[mydates,roll=TRUE]
date yearmon
1: 1999-12-30 Mar 2000
2: 2000-06-30 Jun 2000
3: 2000-06-30 Sep 2000
4: 2000-12-30 Dec 2000
5: 2000-12-30 Mar 2001
> othervals[mydates,roll=1/12]
date yearmon
1: <NA> Mar 2000
2: 2000-06-30 Jun 2000
3: 2000-06-30 Sep 2000
4: 2000-12-30 Dec 2000
5: <NA> Mar 2001
Whereas on 1.9.6 the correct output is:
> othervals[mydates,roll=TRUE]
date yearmon
1: 1999-12-30 Mar 2000
2: 2000-06-30 Jun 2000
3: 2000-06-30 Sep 2000
4: 2000-12-30 Dec 2000
5: 2000-12-30 Mar 2001
> othervals[mydates,roll=1/12]
date yearmon
1: <NA> Mar 2000
2: 2000-06-30 Jun 2000
3: <NA> Sep 2000
4: 2000-12-30 Dec 2000
5: <NA> Mar 2001
>
On 1.9.6 the index difference is being correctly calculated whereas on 1.9.7 it is not.
The text was updated successfully, but these errors were encountered:
I just updated to the latest revision of 1.9.7 and it looks like rolling joins aren't working correctly. Here's an example on 1.9.7:
Whereas on 1.9.6 the correct output is:
On 1.9.6 the index difference is being correctly calculated whereas on 1.9.7 it is not.
The text was updated successfully, but these errors were encountered: