Generic function to return variance explained (R2) estimates from various models. In some cases these will be true R2 values, in other cases they may be pseudo-R2 values if R2 is not strictly defined for a model.
Examples
R2(lm(mpg ~ qsec * hp, data = mtcars))
#> R2 AdjR2
#> 0.7854734 0.7624884