augment.breathtestfit {breathtestcore} | R Documentation |
Broom method augment
to compute predicted values
from the results of class breathttestfit
as generated by
nls_fit
or nlme_fit
.
## S3 method for class 'breathtestfit' augment(x, by = NULL, minute = NULL, dose = 100, ...)
x |
Object of class |
by |
When |
minute |
When a vector is passed, this overrides settings in |
dose |
13C acetate or octanoate dose |
... |
other parameters passed to methods |
When by
is NULL, returns one row for each
original observation pdr, and column fitted
. If new data are given,
i.e. when one of parameter by
or minute
is not null,
only column fitted
is added.
library(broom) # Generate simulated data data = cleanup_data(simulate_breathtest_data(n_records = 3)$data) # Fit using the curves individually fit = nls_fit(data) # Predict values at t=60 and t=120 augment(fit, minute = c(60, 120))