# NOT RUN {
data(Mirex)
lm1 <- lm(mirex~weight, data=Mirex)
rSquared(lm1)
rSquared(lm1,digits=3)
rSquared(lm1,digits=1,percent=TRUE)
## rSquared only works with lm objects
# }
# NOT RUN {
nls1 <- nls(mirex~a*weight^b,data=Mirex,start=list(a=1,b=1))
rSquared(nls1)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab