R/linear_regression_test.R

Defines functions linear_test

#' Use linear regression to see if there are any significance between two columns.
#' 
#' @param data (Data you are wanting to use) 
#' @param col1 (column 1 used from data selected)
#' @param col2 (column 2 used from data selected)
#' @export
#' 
linear_test <- function(data, col1, col2){
  model_fit <- lm(col1 ~ col2, data)  
    summary(model_fit)
    return(model_fit)
}
Hallmark97/R_package_hallmark documentation built on Dec. 17, 2021, 10:28 p.m.