Draws a plot of the resultant acceleration in epochs of window2 size
marking the non-wear time detected by each stage of the non-wear detection
algorithm.
plot_nonwear(data, window2, nonwear_stage1, nonwear_stage2, save_plot)If save_plot = FALSE it returns the plot, otherwise it
saves it.
An impactr_data object, as obtained with
read_acc().
Window 2 size, in minutes, for the non-wear
detection algorithm. Must be the same value as used by the
detect_nonwear() function.
A numeric vector containing the
binary non-wear classification (0 is wear and 1 is non-wear) of each
algorithm's stage per window2 blocks as obtained with the
detect_nonwear() function.
Indicates whether of not to save the plot to visualize the detected non-wear periods to a pdf file. Provide a valid path to a file ending with the ".pdf" extension as a character string if you want the plot to be saved.
This is an internal function, designed to be used inside the wrapper function remove_nonwear() that integrates all steps of detection, removal and inspection of accelerometer non-wear time.
detect_nonwear(),
mark_nonwear(),
summarise_nonwear(),
delete_nonwear()