Skip to content
Back to formatted view

Raw Message

Message-ID: <1337785096682-4631095.post@n4.nabble.com>
Date: 2012-05-23T14:58:16Z
From: jdub
Subject: Get variable names from results of lm()

What is the best way to get the variable names used in lm() from its
results?

Stumbling around I found I could get the response variable name from

myMod$terms[[2]]

but using 

myMod$terms[[1 ]]

gives a tilda.

I found the names buried in other places in the model object and in the
summary of the model, but is there a more direct way, similar to using
coef(myMod) to get the coefficients?


--
View this message in context: http://r.789695.n4.nabble.com/Get-variable-names-from-results-of-lm-tp4631095.html
Sent from the R help mailing list archive at Nabble.com.