Skip to content

Bug Fix for ymd_hms() call embedded in midnight_to_midnight#2

Open
etzkorn wants to merge 2 commits intomartakarass:masterfrom
etzkorn:master
Open

Bug Fix for ymd_hms() call embedded in midnight_to_midnight#2
etzkorn wants to merge 2 commits intomartakarass:masterfrom
etzkorn:master

Conversation

@etzkorn
Copy link

@etzkorn etzkorn commented Nov 4, 2024

An example

fpath <- system.file("extdata", extdata_fnames[1], package = "arctools")
dat <- read_csv(fpath, skip = 10,col_types = "iiiic")
rbind(head(dat, 3), tail(dat, 3))

### passing a posix timestamp into midnight_to_midnight is bugged
acc <- dat$vectormagnitude
acc_ts <- ymd_hms(dat$timestamp)
acc2 <- midnight_to_midnight(acc, acc_ts)
plot(is.na(acc2))
plot(is.na(acc))

### the bug can be explained by the redundant call to ymd_hms within m2m
acc_ts2 <- ymd_hms(acc_ts)
plot(is.na(acc_ts))
plot(is.na(acc_ts2))

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

Successfully merging this pull request may close these issues.

1 participant