apply_filter_sgolay {movementsync} | R Documentation |
Apply a Savitzky-Golay filter to a view
Description
Apply a Savitzky-Golay filter to a view
Usage
apply_filter_sgolay(
view,
data_points,
n,
p,
folder_out = "Filtered",
save_output = FALSE
)
Arguments
view |
|
data_points |
body parts e.g. 'Nose'. |
n |
window size. |
p |
poly order. |
folder_out |
output folder relative to recording home (default is 'Filtered'). |
save_output |
save the output? |
Value
a FilteredView
object.
See Also
Other data functions:
get_data_points()
,
get_duration_annotation_data()
,
get_feature_data()
,
get_filtered_views()
,
get_joined_view()
,
get_metre_data()
,
get_onsets_selected_data()
,
get_processed_views()
,
get_processed_view()
,
get_raw_optflow_view()
,
get_raw_views()
,
get_raw_view()
,
get_recording()
,
get_sample_recording()
Examples
r <- get_sample_recording()
rv <- get_raw_view(r, "Central", "", "Sitar")
pv <- get_processed_view(rv)
set.seed(1)
fv1 <- apply_filter_sgolay(pv, c("Nose", "RWrist", "LWrist"), n = 19, p = 4)
fv2 <- apply_filter_sgolay(pv, c("Nose", "RWrist", "LWrist"), n = 41, p = 3)
set.seed(1) # to reproduce with S3 filter object
fv3 <- apply_filter(pv, c("Nose", "RWrist", "LWrist"), signal::sgolay(4, 19))
[Package movementsync version 0.1.4 Index]