Open Henning-Lenz opened 6 months ago
Looks like rbind.data.table
doesn't combine Period
columns the same way rbind.data.frame
/ the Period
method of c
would, combining the vectors in the object's attributes. This prevents you from subsetting with [.data.table
too, e.g. allmeasurements[1,]
errors.
data.table issue: https://github.com/Rdatatable/data.table/issues/1454
vctrs
package (version 0.6.5 on R 4.3.2) told me to report, so I obey. MWE:Created on 2023-12-22 with reprex v2.0.2
While constructing the MWE I found, that it is crucial to
data.table::data.table()
astibble::tibble()
anddata.frame()
work finelubridate::period()
because plain integers work andlubridate::duration()
work, tooConverting to
tibble
ordata.frame
before (but not after) usingrbind()
produces no error.So it needs a very special combination of objects to be problematic and perhaps therefore it's originally caused by one of the other packages.