Giter Club home page Giter Club logo

Comments (5)

astegman123 avatar astegman123 commented on August 11, 2024 1

UPDATE: this seems to only be an issue with one of the GENEActiwatches

from ggir.

vincentvanhees avatar vincentvanhees commented on August 11, 2024

When you open a new issue, GitHub provides you with a template. Please use that template in order to make it easier for people like me to investigate your problems. In short, I need a reproducible description of the issue you encountered.

from ggir.

astegman123 avatar astegman123 commented on August 11, 2024

Hi! Sorry, I did not realize there was a template. I have included all of the information below. Thank you for your help!

Describe the bug

at the end of the code being run there is an error that pops up saying:

Error in if (P2daysummary_tmp$`N hours`[1] < 24 & P2daysummary_tmp$`N hours`[1] >  : 
  missing value where TRUE/FALSE needed

We have been using our code successfully for a few months and have not changed it prior to receiving this message

To Reproduce
Steps to reproduce the behavior.
Sensor brand: GENEActiwatch
Data format: .BIN
Approximate recording duration: 7 days
Are you using a sleep diary to guide the sleep detection: NO

Copy of R command used:

ONLY RUN THESE TWO LINES IF YOU HAVEN'T PREVIOUSLY INSTALLED: install GGIR and reader for GENEActiv devices
install.packages("GGIR", dependencies = TRUE)
install.packages("GGIRread")
Part 1 introduces program and directory, mode indicates which parts to run (should run all), note to use forward slashes in directory
library(GGIR)
library(GGIRread)
GGIR(mode=c(1,2,3,4,5),
datadir="C:/Users/uXXXXXX/Box/KINES Depner Lab/MASTER LAB Folder/Studies/TOCS/Analyses and Data/Actigraphy/Data",
outputdir="C:/Users/uXXXXX/Box/KINES Depner Lab/MASTER LAB Folder/Studies/TOCS/Analyses and Data/Actigraphy/Output",
do.report=c(2,4,5),
overwrite = TRUE,
windowsizes = c(5,900,3600),
do.cal = TRUE,
do.enmo = TRUE, do.anglez=TRUE,
chunksize=1, printsummary=TRUE,
=====================
Part 2: 
strategy = 1 means select data based on hrs.del.start and hrs.del.end, strategy = 2 makes that only the data between the first midnight and the last midnight is used, 3 is most active days, 4 is only after 1st midnight ###
=====================
strategy = 1,
hrs.del.start = 0, hrs.del.end = 0,
maxdur = 9, includedaycrit = 16,
qwindow=c(0,24),
mvpathreshold =c(100),
excludefirstlast = FALSE,
includenightcrit = 16,
=====================
Part 3 + 4:
I think outliers.only - do.visual only apply if sleep log data present, but keeping in for now ###
=====================
def.noc.sleep = 1,
timethreshold= 5, anglethreshold=5,
ignorenonwear = TRUE,
outliers.only = FALSE,
criterror = 4,
do.visual = TRUE,
=====================
Part 5
=====================
threshold.lig = c(30), threshold.mod = c(100), threshold.vig = c(400),
boutcriter = 0.8, boutcriter.in = 0.9, boutcriter.lig = 0.8,
boutcriter.mvpa = 0.8, boutdur.in = c(1,10,30), boutdur.lig = c(1,10),
boutdur.mvpa = c(1),
includedaycrit.part5 = 2/3,
=====================
Visual report
=====================
timewindow = c("WW"),
visualreport=TRUE)

Have you tried processing your data based on GGIR's default argument values? Does the issue you report still appear? YES
Expected behavior
I expected to receive a GGIR data output with no error message.
Screenshots
If applicable, add screenshots to help explain your problem. Note that usually we are not only interested in see the error message in red, but all GGIR output to the console.

CONSOLE OUTPUT:

> GGIR(mode=c(1,2,3,4,5),
+      datadir="C:/Users/u1041939/Box/KINES Depner Lab/MASTER LAB Folder/Studies/TOCS/Analyses and Data/Actigraphy/Data",
+      outputdir="C:/Users/u1041939/Box/KINES Depner Lab/MASTER LAB Folder/Studies/TOCS/Analyses and Data/Actigraphy/Output",
+      do.report=c(2,4,5),
+      overwrite = TRUE,
+      windowsizes = c(5,900,3600),
+      do.cal = TRUE,
+      do.enmo = TRUE,             do.anglez=TRUE,
+      chunksize=1,                printsummary=TRUE,
+      #=====================
+      # Part 2: 
+      ### strategy = 1 means select data based on hrs.del.start and hrs.del.end, strategy = 2 makes that only the data between the first midnight and the last midnight is used, 3 is most active days, 4 is only after 1st midnight ###
+      #=====================
+      strategy = 1,
+      hrs.del.start = 0,          hrs.del.end = 0,
+      maxdur = 9,                 includedaycrit = 16,
+      qwindow=c(0,24),
+      mvpathreshold =c(100),
+      excludefirstlast = FALSE,
+      includenightcrit = 16,
+      #=====================
+      # Part 3 + 4:
+      ### I think outliers.only - do.visual only apply if sleep log data present, but keeping in for now ###
+      #=====================
+      def.noc.sleep = 1,
+      timethreshold= 5,        anglethreshold=5,
+      ignorenonwear = TRUE,
+      outliers.only = FALSE,
+      criterror = 4,
+      do.visual = TRUE,
+      #=====================
+      # Part 5
+      #=====================
+      threshold.lig = c(30), threshold.mod = c(100),  threshold.vig = c(400),
+      boutcriter = 0.8,      boutcriter.in = 0.9,     boutcriter.lig = 0.8,
+      boutcriter.mvpa = 0.8, boutdur.in = c(1,10,30), boutdur.lig = c(1,10),
+      boutdur.mvpa = c(1),
+      includedaycrit.part5 = 2/3,
+      #=====================
+      # Visual report
+      #=====================
+      timewindow = c("WW"),
+      visualreport=TRUE)

Checking that user has write access permission for directory specified by argument outputdir: Yes

   GGIR version: 3.0.0

   Do not forget to cite GGIR in your publications via a version number and
   Migueles et al. 2019 JMPB. doi: 10.1123/jmpb.2018-0063. 
   See also: https://cran.r-project.org/package=GGIR/vignettes/GGIR.html#citing-ggir

   To make your research reproducible and interpretable always report:
     (1) Accelerometer brand and product name
     (2) How you configured the accelerometer
     (3) Study protocol and wear instructions given to the participants
     (4) GGIR version
     (5) How GGIR was used: Share the config.csv file or your R script.
     (6) How you post-processed / cleaned GGIR output
     (7) How reported outcomes relate to the specific variable names in GGIR
____________________________________________________________________________________________________
 Part 1 

Checking that user has read access permission for all files in data directory: Yes
1 
P1 file 1
Retrieving previously derived calibration coefficients
Retrieved Calibration error (g) before: 0.00262
Retrieved Callibration error (g) after: 0.0014
Retrieved offset correction x: -0.00185215641005664 
Retrieved offset correction y: -0.00121315420337839 
Retrieved offset correction z: 0.00456395232956306
Retrieved scale correction x: 0.999989636532881 
Retrieved scale correction y: 1.00141756323237 
Retrieved scale correction z: 0.990810871538389
Retrieved tempoffset correction x: -0.000148191142137514 
Retrieved tempoffset correction y: -4.08675387655393e-05 
Retrieved tempoffset correction z: 0.000538177142111686

Extract signal features (metrics) with the g.getmeta function:

Loading chunk: 1 2 3 4 5 6 7 8 9 10 11
Save .RData-file with: calibration report, file inspection report and all signal features...

____________________________________________________________________________________________________
 Part 2 
1 
____________________________________________________________________________________________________
 Part 3 
1 
____________________________________________________________________________________________________
 Part 4 
 1
____________________________________________________________________________________________________
 Part 5 
1 
____________________________________________________________________________________________________
 Report part 2 
 1
____________________________________________________________________________________________________
 Report part 4 
 loading all the milestone data from part 4 this can take a few minutes

report not stored, because no results available
____________________________________________________________________________________________________
 Report part 5 
 loading all the milestone data from part 5 this can take a few minutes
 generating csv report for every parameter configurations...
 WW-30-100-400-T5A5
____________________________________________________________________________________________________
 Generate visual reports 
Error in if (P2daysummary_tmp$`N hours`[1] < 24 & P2daysummary_tmp$`N hours`[1] >  : 
  missing value where TRUE/FALSE needed

Desktop (please complete the following information):
OS: [e.g. iOS]-- Windows 10
GGIR Version [e.g. 2.2-0]: 3.0-0
Additional context
we still have a data output but I'm concerned it is not correct since it is formatted differently than normal
Before submitting
[ ] Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there? Yes, Yes, Yes

[ ] Have you tried this on the latest master branch from GitHub? yes

from ggir.

vincentvanhees avatar vincentvanhees commented on August 11, 2024

Thanks for reporting back, I will now close this issue. Feel free to re-open if the issue comes back.

from ggir.

vincentvanhees avatar vincentvanhees commented on August 11, 2024

... actually, if you can still produce a minimally reproducible example of the error then that would be helpful.
For example, the corresponding milestone data file in the meta/basic output folder.

from ggir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.