R/residuals.growthcurve.R

#' Get Model Residuals from Growth Curve Fits
#' 
#' residuals gives the residuals, or the difference between the observed growth
#' data and the fitted values, for a given fit.
#'
#' @param object A fit for some growth data (a \code{growthcurve} object)
#' @param ... Additional arguments (not used)
#'
#' @return A numeric list containing the fit's residuals
#' @export
#'
#' @examples
#' \dontrun{
#' # Get a logistic fit for some data and extract its residuals
#' lfit <- fit_growth_logistic(mydata, Time, OD600)
#' residuals(lfit)}
#' 
residuals.growthcurve <- function(object, ...) {
    r <- object$fit$residuals
    attr(r, "label") <- "Residuals"
    r
}
briandconnelly/growthcurve documentation built on May 13, 2019, 5:13 a.m.