R/strip_lm.R

strip_lm <- function (object) 
{
  
  # return(attr(object$terms, "term.labels"))
  op <- object
  op$y <- NULL
  op$model <- NULL
  # op$residuals <- NULL
  op$fitted.values <- NULL
  op$effects <- NULL
  op$weights <- NULL
  op$prior.weights <- NULL
  op$linear.predictors <- NULL
  attr(op$terms, ".Environment") <- NULL
  attr(op$formula, ".Environment") <- NULL

  class(op) <- class(object)

  return(op)
}
bocinsky/paleocar documentation built on June 2, 2024, 4:12 a.m.