format_r2: Wrapper to extract R-squared from a linear regression model

View source: R/format_strings.R

format_r2R Documentation

Wrapper to extract R-squared from a linear regression model

Description

This function takes an object produced by stats::lm() and returns the model R-squared as a string formaatted for markdown output

Usage

format_r2(mod, as.markdown = T)

Arguments

mod

A linear regression model or the R-squared from a regression model

as.markdown

optional, indicates whether the resulting string should be formatted for markdown. Default is TRUE

Value

Formatted string containing model R-squared


silverer/statstring documentation built on Aug. 6, 2023, 11:48 a.m.