Learn R Programming

ufs (version 0.5.12)

formatR: Pretty formatting of correlation coefficients

Description

Pretty formatting of correlation coefficients

Usage

formatR(r, digits = 2)

Value

The formatted correlation.

Arguments

r

The Pearson correlation to format.

digits

The number of digits to round to.

See Also

noZero(), formatCI(), formatPvalue()

Examples

Run this code
formatR(cor(mtcars$mpg, mtcars$disp));

Run the code above in your browser using DataLab