
A R-square as Text
text_rsq.RdExtracts the R-square from an object and returns it as a text string.
Usage
text_rsq(x, ...)
# S3 method for default
text_rsq(
x,
digits = getOption("out2text_coef_digits", 3),
format = getOption("out2text_coef_format", "f"),
...
)
# S3 method for lm
text_rsq(
x,
digits = getOption("out2text_coef_digits", 3),
format = getOption("out2text_coef_format", "f"),
type = c("unadjusted", "adjusted"),
...
)Arguments
- x
A supported object with an R-square in the results.
- ...
Optional arguments. Ignored for now.
- digits
The number of decimal places to keep. To be passed to
formatC().- format
The format string used in
formatC(). Default is"f".- type
The type of R-squared to be extracted. Either
"unadjusted", the default, or"adjusted", which returns the adjusted R-squared.
Author
Shu Fai Cheung https://orcid.org/0000-0002-9871-9448