Report part 2 Error header argument of length zero

11 views
Skip to first unread message

Mac Murphy

unread,
Jun 20, 2024, 3:06:32 AM (10 days ago) Jun 20
to R package GGIR
Hi all,

I'm trying to run GGIR for just under a week of sleep data collected using an Apple watch. I've never worked with smartwatch data before, nor has anyone in my lab, so I want to make sure I'm approaching this correctly. The data I'm using are here: https://www.dropbox.com/scl/fi/rsyeecz9qchf5i7lwzu9t/combineddata.csv?rlkey=kh2i46ban7uoscxti38r8dm4g&st=nmilqwql&dl=0 

My GGIR call is here:
GGIR(mode = 1:5, datadir = "Research/Liu Lab/College Transition/combineddata.csv",
     outputdir = "Research/Liu Lab/College Transition", studyname = "macdata", do.report = c(2, 4, 5), rmc.nrow = Inf,
     rmc.firstrow.acc = 2, rmc.firstrow.header = 1, rmc.header.length = 1, rmc.col.acc = c(8, 9, 10), rmc.col.time = 1, rmc.unit.acc = "g",
     rmc.unit.time = "character", rmc.format.time = "%Y-%m-%d %H:%M:%OS", desiredtz = "US/Pacific",
     rmc.sf = 10, overwrite = TRUE)

I keep getting this error for Report part 2 when I try to run the above function: Error in if (header != "no header") { : argument is of length zero

My guess is that there's an issue with how I'm reformatting the Apple watch data to be passed through the various sub-functions within GGIR, but I haven't been able to debug. I'd appreciate any advice you have!

Mac Murphy, M.S.
Reply all
Reply to author
Forward
0 new messages