Friday, 16 August 2013

Saving glm object in R

Saving glm object in R

I am trying to save a glm object in R, but when I reload the file, I get a
character vector with the name of the object I am trying to save.
>model = glm(X1 ~ ., family = binomial(link = 'logit'), data = datamatrix)
>save(model, file = 'savedmodel')
>
>savedmodel = load('savedmodel')
>savedmodel
[1] "model"

No comments:

Post a Comment