red_peaks_100 {forceR} | R Documentation |
Reduce Peaks
Description
Reduces curves to 100 observations per peak.
Usage
red_peaks_100(
df,
plot.to.screen = FALSE,
path.data = NULL,
path.plots = NULL,
show.progress = FALSE
)
Arguments
df |
The resulting tibble of the function |
plot.to.screen |
A logical value indicating if results should be
plotted in the current R plot device. Default: |
path.data |
A string character defining where to save the results.
If |
path.plots |
A string character defining where to save result plots.
If |
show.progress |
A logical value indicating if progress should be
printed to the console. Default: |
Value
This function returns a tibble with a similar format as df
, but the columns t
, force
, t.norm
and force.norm
are replaced
by the columns index
, ranging from 1 to 100, and force.norm.100
, containing the rescaled force data ranging from 0 to 1. Since the time series
has been reduced to 100 observations, this tibble will always contain 100 rows per peak.
df
needs to contain the following columns:
force | measurement | peak |
force.norm.norm.1 | measurement.1 | peak.1 |
... | ... | ... |
force.norm.n | measurement.m | peak.n |
Examples
# Using the forceR::df.all.200.tax dataset:
peaks.df.norm.100 <- red_peaks_100(df = forceR::peaks.df.norm,
path.data = NULL,
path.plots = NULL,
show.progress = FALSE)
peaks.df.norm.100