I have used GGIR to extract the sleep and PA variables from .bin files, but didn't attain the raw time series files because the argument was not included in the codes. Now I want to export the time series to .csv files, do I need to do everything again from scratch? Or is there a way to get the time series with less steps?
Another questions is about the time window settings. If I need to analyze a full sleep period for every night, is it better to choose the result file with the time window "WW" instead of "MM"? In that case, is the "WW" time window contradictory to the parameter qwindow (0,24) because they divide a day differently? Also the guiders (HDCZA) by default segment the time from noon to noon to look for SIBs, which seems to be another different way to define a "day". How can these parameters be coordinated? Thank you!
--
You received this message because you are subscribed to the Google Groups "R package GGIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to RpackageGGIR...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/RpackageGGIR/b3d3190e-97e0-47f3-811b-c353b90e1f7fn%40googlegroups.com.
| timestamp | anglex | angley | anglez | ENMO |
| yyyy-mm-ddT10:15:00+0100 | -41.8298 | -11.4056 | 32.8486 | 0.0558 |
| yyyy-mm-ddT10:15:05+0100 | -31.6534 | -26.2329 | 35.4357 | 0.0255 |
| yyyy-mm-ddT10:15:10+0100 | -35.436 | -23.2156 | 29.9964 | 0.0255 |
library(GGIR)
g.shell.GGIR(#=======================================
# General parameters
mode= c(1,2,3,4,5),
datadir="C:/Raw data",
outputdir="C:/Users/Desktop/Data analysis",
studyname= "studyname",
f0 = c(),
f1 = c(),
overwrite = FALSE,
do.report=c(4,5),
idloc=1,
print.filename=TRUE,
storefolderstructure = TRUE,
do.parallel = FALSE,
chunksize=0.5,
windowsizes = c(5,900,3600),
# Part 1 parameters:
# backup.cal.coef = "redo",
# chunksize=1,
# printsummary=TRUE,
do.enmo= TRUE, acc.metric="ENMO",
do.anglez=TRUE,
do.anglex=TRUE,
do.angley=TRUE,
# Part 2 parameters:
strategy = 1,
# ndayswindow=7,
hrs.del.start = 0,
hrs.del.end = 0,
maxdur = 7,
includedaycrit = 16,
winhr = c(5,10),
qlevels = c(c(1380/1440),c(1410/1440)),
qwindow=c(0,24),
ilevels = c(seq(0,400,by=50),8000),
mvpathreshold =c(191.6), #MVPA (moderate and vigorous physical activity threshold
bout.metric = 4,
# iglevels=TRUE,
# Part 3 parameters:
timethreshold= 5,
anglethreshold=5,
ignorenonwear = TRUE, # if TRUE non-wear is not detected as sleep (if FALSE then it will work with imputed data)
constrain2range = TRUE,
do.part3.pdf = FALSE
# Part 4 parameters:
excludefirstlast = FALSE,
includenightcrit = 16, # number of minimum valid hours in a day to attempt sleep analysis
def.noc.sleep = 1,
# If sleep log is available:
loglocation = c(),
#loglocation= loglocation,
outliers.only = FALSE,
criterror = 4,
relyonsleeplog = FALSE,
sleeplogidnum = FALSE,
colid=1,
coln1=2,
do.visual = TRUE,
# Part 5 parameters:
excludefirstlast.part5=TRUE,
threshold.lig = c(53.6), #threshold(s) for inactivity
threshold.mod = c(191.6), #threshold(s) for moderate activity
threshold.vig = c(695.8), #threshold(s) for vigorous activity
boutcriter = 0.8,
boutcriter.in = 0.8, #fraction of an inactivity bout that needs to be below the threshold
boutcriter.lig = 0.8, #fraction of a light activity bout that needs to be between the thresholds
boutcriter.mvpa = 0.8, #fraction of a light activity bout that needs to be above the threshold
boutdur.in = c(5,10,30),
boutdur.lig = c(5,10),
boutdur.mvpa = c(5,10),
timewindow = c("WW", "MM"),
# # Report generation
# # Key functions: Generating reports based on meta-data
save_ms5rawlevels =TRUE,
visualreport=FALSE,
dofirstpage = TRUE,
viewingwindow=1)
Best regards,
Evelyn
To view this discussion on the web, visit https://groups.google.com/d/msgid/RpackageGGIR/96d56fac-bf1e-4efe-b7b5-a0ae40d3b9e9n%40googlegroups.com.