R/pval.R

Defines functions pval

Documented in pval

#' Extract p-value of linear regression
#'
#' Extracts the p-value of a linear regression.
#'
#' @param lmfit A linear model fit using lm()
#' @return p-value of the linear model fit
#' @export
pval <- function(lmfit){anova(lmfit)$'Pr(>F)'[1]}
cfree14/freeR documentation built on Aug. 22, 2023, 11:12 p.m.