R/train_helpers.R

#' Extract a formula from a test
#' 
#' Extracts a formula of the form \code{dependent ~ .} from the test object
#' @param test An object of class 'regression' or 'classification'
#' @importFrom stats as.formula
extract_formula <- function(test){
  as.formula(paste(test$dependent, "~."))
}

Try the crtests package in your browser

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

crtests documentation built on May 1, 2019, 9:09 p.m.