Learn R Programming

forceR (version 1.0.20)

peak_duration_max_force: Peak Duration and Maximum Force

Description

Calculate duration and maximum force for each individual peak.

Usage

peak_duration_max_force(
  df.peaks,
  df.data,
  path.data = NULL,
  show.progress = FALSE
)

Value

Changes values within df.peaks and returns the changed tibble.

Arguments

df.peaks

The resulting tibble of the function find_peaks(). See ?find_peaks for more details.

df.data

A data frame or tibble in the below format. The columns t (time), force, measurement, and specimen. (measurement ID) must be present. This will usually be the same table that was used before in find_peaks().

path.data

A string character defining where to save the results. If NULL (default), data is not stored in a file.

show.progress

A logical value indicating if progress should be printed to the console. Default: FALSE.

<code>df.data</code> needs to contain the following columns:

tforcemeasurement
t.1force.1measurement.1
.........
t.nforce.nmeasurement.m

Examples

Run this code
# Using the forceR::df.all.200.tax dataset:
# \donttest{
# This function needs user input.
peaks.df <- correct_peak(df.peaks = forceR::peaks.df,
                        df.data = forceR::df.all.200.tax,
                        measurement = "m_01",
                        peak = 1,
                        additional.msecs = 5)
# }

Run the code above in your browser using DataLab