Reputation: 16014
using RDatasets
cars = dataset("datasets", "cars")
m1 = lm(@formula(Dist~Speed), cars)
Now how do I extract the R^2 of m1
? I tried summary(m1)
and it didn't contain the information.
Upvotes: 4
Views: 860
Reputation: 69909
You can use r2
or r²
function (two names point at the same function).
For adjusted R^2 you can use adjr2
or adjr²
function.
Upvotes: 5