The algorithm code seems not able to handle data segments without peaks, which I find in ActiGraph data where large time segments can represent a constant as a result of the idle sleep mode, but maybe it also affects other sensor brands that have a similar behaviour. I get error message incorrect number of dimensions with reference to $call peak_info[, 3]
peak_info <- peak_info[peak_info[,4] > sim_thres,] # filter based on sim_thres
peak_info <- peak_info[is.na(peak_info[,1])!=TRUE,] # previous statement can result in an NA in col-1
to
peak_info <- peak_info[peak_info[,4] > sim_thres, , drop = FALSE] # filter based on sim_thres
peak_info <- peak_info[is.na(peak_info[,1])!=TRUE, , drop = FALSE] # previous statement can result in an NA in col-1
With these changes I am able to process the problematic file again.
The algorithm code seems not able to handle data segments without peaks, which I find in ActiGraph data where large time segments can represent a constant as a result of the idle sleep mode, but maybe it also affects other sensor brands that have a similar behaviour. I get error message
incorrect number of dimensions
with reference to$call peak_info[, 3]
To address this revise this code segment from
to
With these changes I am able to process the problematic file again.