Hi Vincent and Jairo,
I’m trying to run a code to process some ActiGraph data (GT9X Link); gt3x files.
The code I am using has worked before on previous data I analysed, but currently, I bump into an error code in Part 1, and I don’t see what I’m doing wrong 😊
The code I’m using:
GGIR( ### ==========================================================
# General parameters
### ==========================================================
mode=c(1,2,3,4,5),
datadir = "~/UGent/Move it, Move ID!/10_Side project/Data masterproef ID/ActiGraph (PA)/001_I.gt3x",
outputdir = "~/UGent/Move it, Move ID!/10_Side project/Data masterproef ID/ActiGraph (PA)/Results_GGIR/001_I",
studyname = "001_I",
overwrite = TRUE,
do.report = c(2,4,5),
### ==========================================================
# Part 1 parameters
### ==========================================================
windowsizes = c(5,900,3600),
do.cal = TRUE,
do.enmo = TRUE,
do.anglez = TRUE,
chunksize = 1,
printsummary = TRUE,
### ==========================================================
# Part 2 parameters
### ==========================================================
strategy = 1,
ndayswindow = 7,
hrs.del.start = 0,
hrs.del.end = 0,
maxdur = 0,
includedaycrit = 10,
qwindow = c(0,24),
ilevels = c(seq(0,400,by=50),8000),
mvpathreshold = c(100.6),
### ==========================================================
# Part 3 & 4 parameters
### ==========================================================
def.noc.sleep = 1,
outliers.only = FALSE,
criterror = 4,
do.visual = TRUE,
### ==========================================================
# Part 5 parameters
### ==========================================================
treshold.lig = c(44.8),
treshold.mod = c(100.6),
treshold.vig = c(428.8),
boutcriter = 0.8,
boutcriter.in = 0.9,
boutcriter.lig = 0.8,
boutcriter.mvpa = 0.8,
boutdur.in = c(10,20,30),
boutdur.lig = c(1,5,10),
boutdur.mvpa = c(1,5,10),
timewindow = c("WW"),
visualreport = TRUE)
--> The Error-code I’m getting: Error in as.POSIXct.numeric(data$time[nrow(data)]) : 'origin' must be supplied
How can I deal with this error code?
Thanks for the help!
Kind regards,
Laura
I also tried running my script on a colleague's computer, and it worked fine. It turns out the error was indeed due to the version of R.
Thanks for your assistance!