Learn R Programming

dafs (version 1.0-38)

Rsq: Formats an R-squared figure for LaTeX

Description

Produces a math-mode formatted string for R-squared.

Usage

Rsq(R, fmt = "$R^2 = %6.4f$", adj = FALSE)

Arguments

R

The R-squared value

fmt

A formatting string for LaTeX

adj

If TRUE appends 'adjusted ' to the format string

Value

A string that will be correctly formatted by LaTeX

See Also

Sweave

Examples

Run this code
# NOT RUN {
r = 0.99
Rsq(r)
# }

Run the code above in your browser using DataLab