R implementation of common cooling laws and functions for fitting time series