I am trying to save trimmed-down GLM objects in R (i.e. with all the \"non-essential\" characteristics set to NULL e.g. residuals, prior.weights, qr$qr).
As an example,
Do you find that you have the same problem when you name the arguments in your call to save
?
I used:
subFn <- function(y, x){
glmObject <- glm(y ~ x, family = "binomial")
save(list = "glmObject", file = "FileName.RData")
}
mainFn <- function(y, x){
subFn(y, x)
}
mainFn(y = rbinom(n = 10, size = 1, prob = 1 / 2), x = 1:10)
I saw that the file "FileName.RData" was created in my working directory. It is 6.6 kb in size.
I then use:
load("FileName.RData")
to load the contents, glmObject
, to my global environment.