R/auxiliary_functions.R

Defines functions makeXY

# Auxiliary functions

makeXY <- function(formula, data){
  mf <- model.frame(formula=formula, data=data)
  x <- model.matrix(attr(mf, "terms"), data=mf)
  y <- model.response(mf)

  list(y = y,
       x = x)
}
akreutzmann/fayherriot documentation built on Aug. 19, 2019, 12:22 p.m.