Skip to content

Commit 63055d3

Browse files
ensure page_offset is set to zero for start 0 or 1
1 parent 3518084 commit 63055d3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

R/readGENEActiv.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ readGENEActiv = function(filename, start = 0, end = 0, progress_bar = FALSE,
7070
}
7171

7272
# Correct timestamps
73-
if (start > 0) {
73+
if (start > 1) {
7474
page_offset = (((start - 1) * 300) / rawdata$info$SampleRate)
75+
} else {
76+
page_offset = 0
7577
}
7678
starttime_num = as.numeric(starttime_posix) + page_offset
7779
rawdata$time = rawdata$time + abs(rawdata$time[1]) + starttime_num

0 commit comments

Comments
 (0)