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 have the following code to join two data.tables, where one has an interval.
x <- data.table(id = c(1,2), interval = c(lubridate::interval(Sys.Date(), Sys.Date() + 1), NA)) y <- data.table(id = c(1,1,2)) z <- x[y, on = .(id)]
If I run print(z), though, I get the following warning:
The problem is that z$interval's data has expanded to the 3 rows, but the @start attribute remains at 2.
Perhaps a clue is that the 2nd row, where id == 1, the interval is NA--NA instead of the expected 5/15/2024 -- 5/16/2024, and the 3rd row, where id == 2, is 5/15/2024--NA, instead of the expected NA--NA. It seems like the merge isn't working correctly?
The text was updated successfully, but these errors were encountered:
I have the following code to join two data.tables, where one has an interval.
x <- data.table(id = c(1,2), interval = c(lubridate::interval(Sys.Date(), Sys.Date() + 1), NA))
y <- data.table(id = c(1,1,2))
z <- x[y, on = .(id)]
If I run
print(z)
, though, I get the following warning:The problem is that z$interval's data has expanded to the 3 rows, but the @start attribute remains at 2.
Perhaps a clue is that the 2nd row, where
id
== 1, the interval is NA--NA instead of the expected 5/15/2024 -- 5/16/2024, and the 3rd row, whereid
== 2, is 5/15/2024--NA, instead of the expected NA--NA. It seems like the merge isn't working correctly?The text was updated successfully, but these errors were encountered: