Related Experiment Video
Updated: May 1, 2026

10:52
Simulation of Human-induced Vibrations Based on the Characterized In-field Pedestrian Behavior
Published on: April 13, 2016
8.8K
triact package for R: analyzing the lying behavior of cows from accelerometer data.
Michael Simmler1, Stijn P Brouwers2
1Digital Production, Agroscope, Ettenhausen, Switzerland.
Peerj
|March 4, 2024
Summary
Researchers developed the triact R package to analyze cow lying behavior using accelerometer data. This open-source tool provides transparent, user-friendly analysis of lying duration, bouts, laterality, and activity proxies.
Area of Science:
- Animal Science
- Agricultural Technology
- Bioacoustics and Biomechanics
Background:
- Accelerometers are effective sensors for monitoring animal behavior, particularly the lying patterns of cows.
- Researchers often require custom data analysis scripts for algorithm transparency and control, preferring open-source solutions over proprietary software.
Purpose of the Study:
- To introduce the 'triact' R package, an open-source tool designed for analyzing cow lying behavior.
- To provide animal scientists with a user-friendly workflow for processing raw accelerometer data.
- To enable the calculation of key lying behavior metrics and activity proxies.
Main Methods:
- Development of the 'triact' R package, compatible with manufacturer-agnostic triaxial accelerometer data.
- Implementation of algorithms for determining total lying duration, number of lying bouts, and mean duration of lying bouts.
- Inclusion of functionalities for assessing lying laterality and calculating proxies for physical activity levels.
Main Results:
- The 'triact' R package offers a streamlined workflow for analyzing cow lying behavior from accelerometer data.
- The package facilitates the quantification of essential lying metrics, including duration, bout frequency, and bout length.
- Provides capabilities for analyzing lying side preference and estimating general cow activity.
Conclusions:
- The 'triact' R package is a valuable, open-source resource for researchers studying cow behavior.
- Its user-friendly interface and comprehensive functionalities enhance the transparency and efficiency of data analysis.
- Freely available via CRAN, promoting wider adoption in animal science research.

