R/Statistical_test.R

Defines functions ST

Documented in ST

#' Statistical test using data with out NA values 
#'
#' @param data is the data frame without NA's  
#' @param weight is a column in the data frame
#' @param year is a column in the data frame
#' @return product is a summary of model_fit 
#' @export 



ST <- function(data, weight, year){
 model_fit <- lm(weight ~ year, data = data)
 product <- summary(model_fit) 
 if (is.list(product) == FALSE ) {
 return("ERROR - Not a list")
}
  return(product)
}
VictoriaRodz/R_package_Rodriguez documentation built on Dec. 18, 2021, 6:16 p.m.