baktoft / yaps

YAPS - Yet Another Positioning Solver
GNU General Public License v3.0
19 stars 4 forks source link

Change in fread datetime defaults breaks preprint example code #37

Closed mhpob closed 2 years ago

mhpob commented 3 years ago

data.table version 1.14.0 changed the default of how they parse datetimes. It seems that prepDetections is expecting a character with millisecond values which breaks the calculation of "frac"; fread now assumes UTC and parses the datatimes directly unless the tz argument is set to ''.

library(yaps)

fn <- system.file("extdata", "VUE_Export_ssu1.csv", package="yaps")
vue <- data.table::fread(fn, fill=TRUE)
detections <- prepDetections(raw_dat=vue, type="vemco_vue")

#Error in strsplit(x, "\\.") : non-character argument
vue <- data.table::fread(fn, fill=TRUE, tz = '')
detections <- prepDetections(raw_dat=vue, type="vemco_vue")

This doesn't seem to affect the package, but breaks the example code in the linked preprint.

mhpob commented 2 years ago

Closed in #41.