Skip to content

Commit

Permalink
Expand the .last_complete_epoch function
Browse files Browse the repository at this point in the history
  • Loading branch information
bhelsel committed Jul 21, 2023
1 parent 64d1234 commit 9a85f82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/get_timestamps.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright © 2022 University of Kansas. All rights reserved.
#
# Creative Commons Attribution NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)

.get_timestamps <- function(raw, epoch, frequency, tz) {

if("start_time" %in% names(attributes(raw))){
Expand Down Expand Up @@ -25,7 +29,7 @@

samples_per_epoch <- frequency * epoch

utils::tail(raw$time, samples_per_epoch * 3) %>%
utils::tail(raw$time, samples_per_epoch * 10) %>%
lubridate::floor_date(paste(epoch, "sec")) %>%
as.character(.) %>%
rle(.) %>%
Expand Down

0 comments on commit 9a85f82

Please sign in to comment.