A question regarding report part 5

88 views
Skip to first unread message

Julia ZZ

unread,
Dec 7, 2021, 2:48:23 PM12/7/21
to R package GGIR
Hi all,

I ran through from part 1 to 4 but could not run through to part5. I wonder if someone has same error shown in the report part 5. And if so, how do you solve the problem?  I attach the error below:

Error in (function (..., deparse.level = 1)  : 
  number of columns of matrices must match (see arg 307)

Please let me know if you has any ideas or suggestions. Thank you very much.

Sincerely,
Julia

Vincent van Hees

unread,
Dec 10, 2021, 9:18:20 AM12/10/21
to Julia ZZ, R package GGIR
Error messages that refer to number of columns often indicates that GGIR struggles to append the results from different individuals. The cause of this could be that individuals where processed with different GGIR parameters. So, first step would be to see whether the problem remains when you reprocess all files with part 5.

If this does not address it then maybe the problem is elsewhere. I can have a look if you could share with me materials to help me reproduce the issue, e.g.:
- A minimal subset of .RData files from GGIR part 1 stored in meta/basic. If you have 1000 files then please find a subset that allows for reproducing  the error.
- Your g.shell.GGIR function call or config.csv file.

Thanks, Vincent

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

‐‐‐‐‐‐‐ 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/070f3e9f-a217-4202-9150-93287ca6c090n%40googlegroups.com.

Julia ZZ

unread,
Dec 13, 2021, 10:40:58 AM12/13/21
to R package GGIR
Hi Vincent,

Thank you so much for the reply. I have 803 files in total, and the aforementioned error occurred when I processed all files together. I tried to run files in small batches. The error was not there anymore. However, I found other repeating warnings and errors that made the files fail to part 5 such as following:
Errors and warnings for 1026RAW.csv.RData$message [1] "missing value where TRUE/FALSE needed 

$call

if (wake_night1 != "" & onset_night1 != "") {

    wake_night1_hour = clock2numtime(wake_night1)

    onset_night1_hour = clock2numtime(onset_night1)

    if (wake_night1_hour > 12 & (onset_night1_hour >= 12 & onset_night1_hour <

        18)) {

        wake_night1_hour = wake_night1_hour - 24

    }

    wake_night1_index = nightsi[1] + round(wake_night1_hour *

        Nepochsinhour)

    if (wake_night1_index > Nts)

        wake_night1_index = Nts

    if (wake_night1_hour > 18)

        wake_night1_hour = wake_night1_hour - 24

    if (wake_night1_index < 1)

        wake_night1_index = 1

    wake_night1_index = nightsi[1] + round(wake_night1_hour *

        Nepochsinhour)

    if (wake_night1_index > Nts)

        wake_night1_index = Nts

    if (wake_night1_index < 1)

        wake_night1_index = 1

} else {

    wake_night1_index = nightsi[1] + round((SPTE_end[1] - 24) *

        Nepochsinhour)

}

And I ran 100 files, only 75 files processed and had milestone data in ms5.out folder. Besides, only  73 had part5_personsummary output in results folder. I attached the codes used, sleep log, and console to the email. As for the basic folder, it is 95 MB, but the gmail consider it to be too large. So I have to send it to your email. I am sorry for the inconvenience and thank you very much. Your help means a lot.


Sincerely,
Julia
sleep_log_v2.csv
GGIR_codes.docx
console1_100 - Copy.docx

Vincent van Hees

unread,
Dec 16, 2021, 2:47:08 AM12/16/21
to Julia ZZ, R package GGIR
Hi Julia,

I am not able to reproduce these errors and warning with the data you sent. However, I do get various other warnings and GGIR does indeed not generate part5 output for a substantial part of your recordings.

The missing GGIR part 5 output is because the accelerometer was not worn in many of your recordings. This can be seen from the part 2 report (see mode = 1:2 and do.report = 2). Note that GGIR part 5 only produces output for recordings with sufficient data to describe at full day.

The warnings I get are because: 
1. Your sleeplog has many days where only wakeup or sleeponset is available. GGIR needs both and ignores sleeplog nights that do not have a beginning and an end time. This then seems to cause confusion in R about the formatting of the times as for some days time values are entirely missing across individuals.
2. You have empty rows in your sleeplog with only a participant ID. This is not really a problem, but it seems to trigger the R warning.

I have now prepared a GGIR enhancement that tries to better handle these conditions and avoid the warnings. To install this version use the following commands in the R(Studio) console:

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

Vincent

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

Julia ZZ

unread,
Jan 24, 2022, 1:39:46 PMJan 24
to R package GGIR
Hi Vincent,

Thank you! The new version did solve my problem.

Sincerely,
Julia

Reply all
Reply to author
Forward
0 new messages