admin管理员组文章数量:1405610
I am running GGIR version 3.2-0 on R version 4.4.2. I am using AX3 accelerometers for a study on cognition and sleep.
For the sake of simplicity, I'm using all the default parameters
GGIR(datadir="...",
outputdir="...")
Unfortunately four of my participants' devices were initialised (ie. recording started) on a laptop with the wrong timezone. The initialising computer time was set to GMT/UK time, whereas it should have been set to East Africa Time (EAT) - EAT was 3 hours ahead of GMT on the day this happened. The sleep/wake times are therefore 3 hours too early on the summary reports (eg. the output says the participant went to sleep at 9pm and woke up at 2am, whereas they actually went to sleep at 12pm and woke at 5am).
Is there any way to get GGIR to correct for this when analysing the data to produce summary results which reflect the sleep/wake times locally, rather than what the time was in London when they went to sleep/woke up?
I am running GGIR version 3.2-0 on R version 4.4.2. I am using AX3 accelerometers for a study on cognition and sleep.
For the sake of simplicity, I'm using all the default parameters
GGIR(datadir="...",
outputdir="...")
Unfortunately four of my participants' devices were initialised (ie. recording started) on a laptop with the wrong timezone. The initialising computer time was set to GMT/UK time, whereas it should have been set to East Africa Time (EAT) - EAT was 3 hours ahead of GMT on the day this happened. The sleep/wake times are therefore 3 hours too early on the summary reports (eg. the output says the participant went to sleep at 9pm and woke up at 2am, whereas they actually went to sleep at 12pm and woke at 5am).
Is there any way to get GGIR to correct for this when analysing the data to produce summary results which reflect the sleep/wake times locally, rather than what the time was in London when they went to sleep/woke up?
Share Improve this question asked Mar 22 at 13:34 Lachlan FotheringhamLachlan Fotheringham 11 bronze badge 6 | Show 1 more comment1 Answer
Reset to default 0I've found the answer in the package documentation. This solves the problem I had, where the computer initialising the tracker was in a different timezone (London), to the participant using the tracker (Nairobi). The resulting output using the code below showed the correct hours of waking/sleeping in the summary CSV
Overwrite = TRUE was required to reprocess the input files.
Please remember that stating the different times zones (as in the code below) will change the config file, which will keep these settings until you reset or change them. It's probably easiest to move to a different output folder for trackers in different time zones. This should revert to default settings.
GGIR(datadir="/my/path/input",
outputdir="/my/path/output",
studyname = "My Study",
overwrite = TRUE,
desiredtz = "Africa/Nairobi",
configtz = "Europe/London")
本文标签: rGGIRhow to correct for incorrect time zoneStack Overflow
版权声明:本文标题:r - GGIR - how to correct for incorrect time zone - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744313479a2600144.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
as.POSIXct(time stamp) + (3*60*60)
. Welcome to stackoverflow. – Chris Commented Mar 22 at 16:32attr(timestamp, "tzone")
return, how is it shown on the console, and what should it look like? – r2evans Commented Mar 22 at 18:01desiredtz = "Africa/Nairobi", configtz = "Europe/London"
. – Lachlan Fotheringham Commented Mar 27 at 9:55