Learn R Programming

forceR

A vignette which guides you through all functions of the package is available here.

Functionality

The package forceR has originally been written for insect bite force data preparation and analysis, but it can be used for any kind of time series measurements. Functions include

  • loading, plotting, and cropping of data
  • correction of charge amplifier drifts
  • correction of baseline drifts
  • reduction of sampling frequency
  • automatic extraction of single peaks
  • rescaling (normalization) of curves
  • reduction of curves to 100 time steps each
  • finding of best polynomial fits to describe all curves

Installation

Official release

To install the stable version of forceR from CRAN use the following command:

install.packages('forceR')

Development version

You can also install the current development version of forceR from the GitHub repository:

require(devtools)
devtools::install_github("https://github.com/Peter-T-Ruehr/forceR")

Version history

Check out the News page of forceR.

Citation

If you use this package, please cite the original publication:

Rühr, PT & Blanke, A (2022): forceX and forceR: a mobile setup and R package to measure and analyze a wide range of animal closing forces. Methods in Ecology and Evolution 13(9): p. 1938--1948. doi: 10.1111/2041-210X.13909.

Copy Link

Version

Install

install.packages('forceR')

Monthly Downloads

249

Version

1.0.20

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Peter Rc3<bc>hr

Last Published

March 1st, 2023

Functions in forceR (1.0.20)

df.all.200.tax

Simulated Force Measurements with Taxonomic Info.
df.all

Simulated Force Measurements with Taxonomic Info.
find_best_fits

Find Best Polynomial Fits for Curves
load_mult

Load Multiple Measurements
find_strongest_peaks

Find Peaks
forceR_example

Get path to forceR example
load_single

Load single measurement
peak_duration_max_force

Peak Duration and Maximum Force
models

Polynomial Models Describing Average Peak Shapes.
peak_to_poly

Convert Time Series to Polynomial
plot_measurement

Plot raw measurement
plot_peaks

Plot Peaks
peaks.df.100.avg

Average Peak Shapes per Species
peaks.df

Starts and Ends of the 5 Strongest Peaks
rescale_to_range

Scale data series to new minimum and maximum
print_progress

Print progress
simulate_bites

Simulate bites
reduce_frq

Reduce Sampling Frequency
peaks.df.norm

Normalized Peak Shapes
peaks.df.norm.100

Normalized Peak Shapes with 100 Observations
red_peaks_100

Reduce Peaks
rescale_peaks

Rescale Peaks
sort_files

Sorts files after corrections
today

Get Today's Date as String
y_to_force

Convert Time Series to Force
summarize_measurements

Summarize Table
baseline_corr

Automatic or Manual Baseline Correction of Time Series
convert_measurement

Converts LJStream *.dat file to standard time series.
classifier

Classifier
correct_peak

Manually Correct Single Peak
amp_drift_corr

Charge Amplifier Drift Correction
avg_peaks

Average Curves per Group
crop_measurement

Crop Time Series
df.all.200

Simulated Time Series - e.g. Bite Force Measurements