Error in verisense_count_steps with default parameters — 'length = 5' in coercion to 'logical(1)' #1529
Replies: 3 comments 2 replies
|
Please note that Verisense has not been maintaining their repository, so if you follow their instructions it may indeed not work. Did you follow our instructions: https://cran.r-project.org/web/packages/GGIR/vignettes/StepCadenceAnalysis.html If the problem persists, please report:
|
|
A common mistake is that people fill in If that does not resolve the issue. Please send me your R script and an example file to allow me to reproduce the error (via email is ok for this). |
|
I am closing this |
Uh oh!
There was an error while loading. Please reload this page.
Dear GGIR maintainers,
I'm encountering an error when running the verisense_count_steps step-counting algorithm with its default settings, built via build_GGIR_verisense_functions ("verisense_count_steps"). The function fails during execution with:
Error in length(peak_info) == 0 || length(peak_info) == sum(is.na(peak_info)) :
'length = 5' in coercion to 'logical(1)'
Called from: myfun$FUN(resampleAcc(data, sf, myfun) * unitcorrection, myfun$parameters)
This suggests that peak_info is a list/vector of length 5 (rather than length 0 or 1) at the point where the internal || check occurs inside verisense_count_steps, which breaks the length-1 logical coercion required by ||. It looks like an internal bug in the peak-detection logic of verisense_count_steps rather than an issue with my input data, since it happens with default parameters.
Session info:
R version: 4.6.1 (2026-06-24 ucrt), Windows 11 x64
GGIR version: 3.3-8
myfun$parameters: c(4, 4, 20, -1, 4, 4, 0.01, 1.25) (defaults)
myfun$expected_sample_rate: 15
Could you let me know if this is a known issue, and whether there's a workaround or fix planned? Happy to provide a reproducible example or test data if useful.
Thank you for your time and for maintaining this package.
Best regards,
Ricardo Martins.
All reactions