R script for quantification of physiological dynamic responses of individual animals exposed to environmental challenges by means of differential smoothing
Résumé
This R script smoothes individual time series of physiological responses of animals that have been exposed to environmental challenges, into continuous functions through a differential smoothing approach. Several operations are applied to the smoothed functions in order to extract a total of 23 individual-based descriptors related to the shape, timing and dynamics of the response per each individual and each challenge. The first part of the script is adapted to analyze physiological variables that increase in face to challenges, such as individual time series of plasma non-esterified fatty acids (NEFA) concentrations (g·L-1) in sucking cows. The second part of the code is written to smooth variables that decrease in face of perturbations, such as time series of milk yield (kg·d-1) from suckling cows. The code is self explanatory and requires the installation of the package 'fda'. Two datasets that can be used to run the script are available for download under https://doi.org/10.5281/zenodo.5776521 (for NEFA) and https://doi.org/10.5281/zenodo.5776669 (for MY). The script can be adapted to smooth time series from any other physiological function that is sensitive to the environmental challenge, provided that the challenge is know a priori.