R/FSAUtils.R
rSquared.Rd
Extracts the coefficient of determination (i.e., “r-squared”) from a linear model (i.e., lm
) object.
rSquared(object, ...)
# S3 method for default
rSquared(object, ...)
# S3 method for lm
rSquared(object, digits = getOption("digits"), percent = FALSE, ...)
An object saved from lm
.
Additional arguments for methods.
A single number that is the number of digits to round the returned result to.
A logical that indicates if the result should be returned as a percentage (=TRUE
) or as a proportion (=FALSE
; default).
A numeric, as either a proportion or percentage, that is the coefficient of determination for a linear model.
This is a convenience function to extract the r.squared
part from summary(lm)
.