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.