# NOT RUN {
model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
r2(model)
if (require("lme4")) {
model <- lmer(Sepal.Length ~ Petal.Length + (1 | Species), data = iris)
r2(model)
}
# }
Run the code above in your browser using DataLab