Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change in fread datetime defaults breaks preprint example code #37

Closed
mhpob opened this issue Jul 1, 2021 · 1 comment
Closed

Change in fread datetime defaults breaks preprint example code #37

mhpob opened this issue Jul 1, 2021 · 1 comment

Comments

@mhpob
Copy link

mhpob commented Jul 1, 2021

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 mhpob changed the title Change in fread datetime defaults Change in fread datetime defaults breaks preprint example code Jul 1, 2021
@mhpob mhpob closed this as completed Dec 20, 2021
@mhpob
Copy link
Author

mhpob commented Dec 20, 2021

Closed in #41.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant