subsample_data {breathtestcore}R Documentation

Decimate densely sampled 13C time series


When data of a record are more closely spaced than sample_minutes, these are spline-subsampled to sample_minutes. In the region of the initial slope, i.e. the initial fifth of the time, the record is sampled more densely. Too dense sampling leads to non-convergent nlme fits and to long runs with Stan-based fits. The function is used internally by function link{nlme_fit} in package breathtestcore and is exported for use by package breathteststan.


subsample_data(data, sample_minutes)



Data frame with columns patient_id, group, minute, pdr.


Required average density. When points are more closely spaced, data are subsampled. No upsampling occurs when data are more sparse.

[Package breathtestcore version 0.8.1 Index]