R/null_fit.R

Defines functions null_fit

Documented in null_fit

#' @title Convert data to class breathtestfit
#' @description Does not change the data set, but returns a class suitable
#' for plotting raw data with \code{\link{plot.breathtestfit}}. 
#' See \code{\link{read_any_breathtest}} for an example.
#'
#' @param data Data frame or tibble as created by \code{\link{cleanup_data}}, 
#' with mandatory columns \code{patient_id, group, minute} and \code{pdr}. 
#' @param ... Not used
#'
#' @return A list of classes \code{breathtestnullfit, breathtestfit} 
#' with element \code{data} which contains the unmodified data.
#' @export
null_fit = function(data, ...){
  x = list(data = data) 
  class(x) = c("breathtestnullfit", "breathtestfit")
  x
}

Try the breathtestcore package in your browser

Any scripts or data that you put into this service are public.

breathtestcore documentation built on Feb. 16, 2023, 10:42 p.m.