Visual report not being generated

190 views
Skip to first unread message

Leticia Sewaybricker

unread,
Jul 19, 2023, 4:04:30 PM7/19/23
to R package GGIR
Hi all,

With GGIR version 2.9-5 everything is running smoothly but the visual report. I am getting this error:
Generate visual reports Error in if (P2daysummary_tmp$`N hours`[1] < 24 & P2daysummary_tmp$`N hours`[1] > : missing value where TRUE/FALSE needed

Does anybody have any thoughts?

I confess that I was wondering if it could be somewhat linked to what is being presented by Krista in the conversation entitled " Error in part 4: Error in if (WKN2 > SLN2 )".

Please, find below the script being used. Attached there is the config file, the.RData file from meta/basic folder.

##GGIR analysis for WEBS##
##Run first this if wants step counts
source("***/verisense_count_steps.R") # update to local path to verisense_count_steps.R file
myfun =  list(FUN=verisense_count_steps,
              parameters= c(3, 5, 15, -0.5, 3, 4, 0.001, 1.2),
              expected_sample_rate= 15,
              expected_unit="g",
              colnames = c("step_count"),
              outputres = 1,
              minlength = 1,
              outputtype="numeric",
              aggfunction = sum,
              timestamp=F,
              reporttype="event")

##CLEANER version##
library(GGIR)
GGIR(datadir=" C:/ ***",
     outputdir=" C:/ ***",
     configfile = "C:/***/config_webs2.csv",
     WornDuringSleep = TRUE,
     part2ImpWithZero = FALSE,
     part2ExcludeNonwear = TRUE,
     includedaycrit = 8,
     ndayswindow = 0,
     strategy = 1,
     maxdur = 8,
     hrs.del.start = 4,
     hrs.del.end = 0,
     includedaycrit.part5 = 0.33333333,
     excludefirstlast.part5 = FALSE,
     do.imp = FALSE,
     minimum_MM_length.part5 = 8,
     excludefirstlast = FALSE,
     includenightcrit = 8,
     excludefirst.part4 = FALSE,
     excludelast.part4 = FALSE,
     max_calendar_days = 8,
     imputeTimegaps = FALSE,
     myfun = myfun)

Thanks!
Leticia

meta_001.csv.RData
config_webs2.csv

Jairo Hidalgo Migueles

unread,
Jul 20, 2023, 2:55:54 AM7/20/23
to R package GGIR
Hi Leticia,

May I ask how the part 2 daysummary report look like for this file? Can you see the variables N hours and N validhours there?

Best,
Jairo

Leticia Sewaybricker

unread,
Jul 20, 2023, 3:58:14 PM7/20/23
to R package GGIR
Hi Jairo, great point.
I can see both N hours and N validhours and they both look right. Attached part 2 daysummary report in case it helps.
Thanks for digging into it.
Leticia
part2_daysummary.csv

Jairo Hidalgo Migueles

unread,
Jul 21, 2023, 6:17:44 AM7/21/23
to R package GGIR
Did you also get meta data for parts 3 and 4? If so, the visualreport should be generated. Can you share meta data from part 1 so that I can have a look? You'll find that in the output folder (meta/basic/).

Best,
Jairo

Leticia Sewaybricker

unread,
Jul 21, 2023, 3:19:57 PM7/21/23
to R package GGIR
Hi Jairo,

please see attached 3 files
1) "meta_001" - file from meta/basic/ folder
2) "001_ms3" (renamed for sharing purpose) - file from meta/ms3.out folder
3) "001_ms4" (renamed for sharing purpose) - file from meta/ms4.out folder

Let me know if anything else would be helpful.
Thanks!
Leticia
001_ms3.csv.RData
001_ms4.csv.RData
meta_001.csv.RData

Vincent van Hees

unread,
Aug 10, 2023, 12:45:24 PM8/10/23
to Leticia Sewaybricker, R package GGIR
Hi Leticia,

I see your reply to Jairo has not been answered yet. I just had a look at the files
and I managed to fix the issue by adding argument 'do.part3.pdf = FALSE' to your code. This will tell GGIR not to created a pdf visualisation in part 3, which is where I think the bug is. The visualisation is probably not that important. In the new GGIR 2.10-1 (more about that in my email later today) you may want to consider setting visualreport_without_invalid = FALSE.

Best,

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/c2632400-3282-433d-8fec-0bd0c0bf5e16n%40googlegroups.com.

Leticia Sewaybricker

unread,
Aug 11, 2023, 11:39:01 AM8/11/23
to R package GGIR
Hi Vincent,

Thank you for investigating further and sharing this option.
I will run more tests on my end - specially now with the new GGIR 2.10-1 (exciting news!!) - and share any updates I have.

Thank you once more.

Best wishes,

Leticia

Jairo Hidalgo Migueles

unread,
Sep 4, 2023, 6:51:15 AM9/4/23
to R package GGIR
Hi Leticia,

I'm sorry I couldn't look at this before. I have just run your file through GGIR version 2.10-1 (current version in CRAN) and everything run well, even with do.part3.pdf = TRUE. The only thing I had to change in your script is the definition of the desiredtz, as I observed your timestamps contained "-0700", so I defined desiredtz = "Etc/GMT+7". If, by any chance, you are processing the data in a different timezone where they were collected, you would also need to define desiredtz as I did.

Additionally, I was able to reproduce the error that you first reported in this thread:
Error in if (P2daysummary_tmp$`N hours`[1] < 24 & P2daysummary_tmp$`N hours`[1] > : missing value where TRUE/FALSE needed

This error appears in the generation of the file summary reports (pdf visualizations), so it is not affecting your output, just the visualizations. I am working on a solution for this now.

Best,
Jairo 
Reply all
Reply to author
Forward
0 new messages