Part 5 Error

302 views
Skip to first unread message

stuart.ro...@googlemail.com

unread,
Jan 11, 2022, 4:33:26 PM1/11/22
to R package GGIR
Hi all
I have been using GGIR for a while but with my recent batch of analysis i can run parts 2-4 but when running part 5 i get the following error 

Report part 5

 loading all the milestone data from part 5 this can take a few minutes

Error in (function (..., deparse.level = 1)  :

  number of columns of matrices must match (see arg 284)

This is not something i have encountered before.

The GGIR code i am using is below when trying to run part 5 alone after successfully running parts 2-4.

If anyone else has encountered this and came up with a solution then let me know.


Cheers

Stuart

g.shell.GGIR(#=======================================
             # INPUT NEEDED:
             mode=c(5),
             datadir="xxxx",
             outputdir="xxx",
             f0=1, f1=c(),
             overwrite = FALSE,
             #-------------------------------
             # Part 1:
             #-------------------------------
             # Key functions: reading file, auto-calibration, and extracting features
             do.enmo = TRUE,             do.anglez=TRUE,
             desiredtz="Asia/Kuwait",
             chunksize=1,                printsummary=TRUE,
             #-------------------------------
             # Part 2:
             #-------------------------------
             strategy = 1,               ndayswindow=7,
             hrs.del.start = 0,          hrs.del.end = 0,
             maxdur = 9,                 includedaycrit = 16,
             winhr = c(5,10),
             qlevels = c(c(1380/1440),c(1410/1440)),
            qwindow=c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24),
            doilevels = TRUE,
             ilevels = c(0, 30, 100, 200, 300, 400, 8000),
             mvpathreshold =c(100),
             bout.metric = 4,
             closedbout=FALSE,
             iglevels=TRUE,
             #-------------------------------
             # Part 3:
             #-------------------------------
             # Key functions: Sleep detection
             timethreshold= c(5),        anglethreshold=5,
             ignorenonwear = TRUE,
             #-------------------------------
             # Part 4:
             #-------------------------------
             # Key functions: Integrating sleep log (if available) with sleep detection
             # storing day and person specific summaries of sleep
             excludefirstlast = FALSE,
             includenightcrit = 16,
             def.noc.sleep = c(1),
             outliers.only = TRUE,
             criterror = 4,
             relyonsleeplog = FALSE,
             colid=1,
             coln1=2,
             do.visual = FALSE,
             nnights = 9,
             #-------------------------------
             # Part 5:
             # Key functions: Merging physical activity with sleep analyses
             #-------------------------------
             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),   timewindow = c("WW"), frag.metrics = "all",
             part5_agg2_60seconds= TRUE,
             #-----------------------------------
             # Report generation
             #-------------------------------
             # Key functions: Generating reports based on meta-data
             do.report=c(2,4,5),
             visualreport=FALSE,     dofirstpage = FALSE,
             viewingwindow=1)


Vincent van Hees

unread,
Jan 12, 2022, 11:35:02 AM1/12/22
to stuart.ro...@googlemail.com, R package GGIR
Hi Stuart,

I think it is a bug in GGIR specific to when using argument storefolderstructure = TRUE, small chance that is also affects other configurations, I have now drafted a fix to this.
Would you mind installing the development version of GGIR with the following code:

install.packages("remotes")
library(remotes)
remotes::install_github("wadpac/GGIR", ref= issue484_columnmatches")
library(GGIR)

Next, please re-run part 5 (argument: mode = 5) and re-create the report (argument: do.report = 5).

Let met know if this addresses the issue.
Cheers, Vincent

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
--
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/adc542df-0600-4cdd-a2d8-0652f52a650dn%40googlegroups.com.

stuart.ro...@googlemail.com

unread,
Jan 12, 2022, 1:10:20 PM1/12/22
to R package GGIR
Hi Vincent

You are a star - that has fixed it.

Thanks again for all the help and work you do on GGIR!

Cheers
Stuart

Julia

unread,
Jan 26, 2023, 7:26:12 AM1/26/23
to R package GGIR
Hi Vincent,

I have a follow-up question on this topic. 
I had the same problem and tried the suggested code. I received the following error after installing 'remotes':

remotes::install_github("wadpac/GGIR", ref= "issue484_columnmatches") 

Downloading GitHub repo wadpac/GGIR@issue484_columnmatches
Error in utils::download.file(url, path, method = method, quiet = quiet,  : cannot open URL 'https://api.github.com/repos/wadpac/GGIR/tarball/issue484_columnmatches' >

Do you have a suggestion to solve this problem?

Thank you!

Best, 
Julia 




Op woensdag 12 januari 2022 om 17:35:02 UTC+1 schreef Vincent van Hees:

Jairo Hidalgo Migueles

unread,
Feb 4, 2023, 4:03:53 AM2/4/23
to R package GGIR
Hi Julia,

The branch  "issue484_columnmatches" is from 1 year ago, so I would say that the changes in that branch are already implemented in the current GGIR version. Try to install GGIR with
install.packages("GGIR")

Make sure you are using the version 2.8-2 and re-run your script.

Best,
Jairo

Julia

unread,
Feb 6, 2023, 3:35:33 AM2/6/23
to R package GGIR
Hi Jairo,

Thank you for answering.
I still experience a smilar problem, but in the report of part 4.

 Report part 4   
loading all the milestone data from part 4 this can take a few minutes 
Error in (function (..., deparse.level = 1)  :    
number of columns of matrices must match (see arg 2)

It does not give this error when I run the script on less patient files. 
Do you have any suggestions?

Thank you!

Best,
 Julia 


Op zaterdag 4 februari 2023 om 10:03:53 UTC+1 schreef jairo.hidal...@gmail.com:

Vincent van Hees

unread,
Feb 15, 2023, 10:39:07 AM2/15/23
to Julia, R package GGIR
Hi Julia,

Just sharing an error message does not make it easy for others to help you.
Please share as much detail as possible to help others help you, ideally with a reproducible small example of the error, including:
  • GGIR call used
  • Example .RData file from the meta/basic folder
  • Description of what you have tried to understand the issue
  • Description of what differs between the files for which the code worked.

Thanks,

Vincent


Dr. Vincent van Hees | Independent consultant | https://accelting.com/
image

------- Original Message -------
Reply all
Reply to author
Forward
0 new messages