Error in Report part 5

99 views
Skip to first unread message

david levitan

unread,
Jun 27, 2024, 9:57:03 AM6/27/24
to R package GGIR

Hello everyone,

I'm currently using GGIR to process raw data extracted from a Garmin Vivosmart 5 through Labfront. However, I'm encountering an error in Part 5 of the report generation.

Here is the code I am using:
library(GGIR)

# Define the file paths
datadir <- "C:/garmin test/David/test2/"
outputdir <- "C:/garmin test/1/"

# Ensure the output directory exists
if (!dir.exists(outputdir)) {
  dir.create(outputdir, recursive = TRUE)
}

# Ensure the meta directory exists
meta_dir <- file.path(outputdir, "meta")
if (!dir.exists(meta_dir)) {
  dir.create(meta_dir, recursive = TRUE)
}

# Run GGIR with correct parameters
GGIR(
  mode = 1:5,
  datadir = datadir,
  outputdir = outputdir,
  f0 = 1,
  f1 = 9,
  do.imp = TRUE,
  do.enmo = TRUE,
  do.anglez = TRUE,
  studyname = "Garmin",
  minimumFileSizeMB = 0,
  #=====================
  # read.myacc.csv arguments
  #=====================
  rmc.nrow = Inf,
  rmc.dec = ".",
  rmc.firstrow.acc = 11,  # Row where data starts
  rmc.col.acc = 2:4,  # Columns for accX, accY, accZ
  rmc.col.time = 1,  # Column for unixTimestampInMs
  rmc.unit.acc = "g",  # Adjust to match your data
  rmc.unit.time = "UNIXsec",
  desiredtz = "Asia/Jerusalem",
  rmc.sf = 25
)

The output and error

hecking that user has write access permission for directory specified by argument outputdir: Yes GGIR version: 3.1.1 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 Busy processing ... see C:/garmin test/1//output_test2/meta/basic for progress ________________________________________________________________________________________________ Part 2 Busy processing ... see C:/garmin test/1//output_test2/meta/ms2.out for progress ________________________________________________________________________________________________ Part 3 Busy processing ... see C:/garmin test/1//output_test2/meta/ms3.out for progress ________________________________________________________________________________________________ Part 4 1 2 3 4 5 6 ________________________________________________________________________________________________ Part 5 Busy processing ... see C:/garmin test/1//output_test2/meta/ms5.out for progress ________________________________________________________________________________________________ Report part 2 1File aaa1.csv.RData not available in part 2 2 3 4 5 6 7 8 9 ________________________________________________________________________________________________ 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... MM-40-100-400-T5A5Error in if (input == "" || length(grep("\\n|\\r", input))) { : missing value where TRUE/FALSE needed In addition: Warning message: No summary data available to be stored in csv-reports

Any insights or suggestions on how to resolve this issue would be greatly appreciated.

Thank you,
David Levitan 

Vincent van Hees

unread,
Jul 13, 2024, 11:30:29 AM7/13/24
to david levitan, R package GGIR
Hello David,

When I google the error message it brings me to the fread function in the data.table package (https://github.com/cran/data.table/blob/master/R/fread.R#L55-L56). This indicates that there is no data to be stored. I see you are trying to force GGIR to even consider files with 0MB with parameter minimumFileSizeMB = 0. So, that could be the problem: GGIR is not designed for handling recordings that have only a few minutes or no data. If you have a series of shorter recordings that together could form a continuous multi-day recording then consider parameter 'maxRecordingInterval' which allows you to append those recordings. Otherwise it seems best to skip the very short recordings.

Best,

Vincent
--
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/39a60baa-7559-40e2-a342-0d845fa292e5n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages