Skip to content

Instantly share code, notes, and snippets.

@DexGroves
Created March 30, 2016 09:11
Show Gist options
  • Save DexGroves/a3ef6586133c12b876d0c76815813e9f to your computer and use it in GitHub Desktop.
Save DexGroves/a3ef6586133c12b876d0c76815813e9f to your computer and use it in GitHub Desktop.
strip_glm <- function(cm) {
cm$y = c()
cm$model = c()
cm$residuals = c()
cm$fitted.values = c()
cm$effects = c()
cm$qr$qr = c()
cm$linear.predictors = c()
cm$weights = c()
cm$prior.weights = c()
cm$data = c()
cm$family$variance = c()
cm$family$dev.resids = c()
cm$family$aic = c()
cm$family$validmu = c()
cm$family$simulate = c()
attr(cm$terms,".Environment") = c()
attr(cm$formula,".Environment") = c()
cm
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment