R/formatR.R
formatR.Rd
Pretty formatting of correlation coefficients
formatR(r, digits = 2)
The Pearson correlation to format.
The number of digits to round to.
The formatted correlation.
noZero(), formatCI(), formatPvalue()
noZero()
formatCI()
formatPvalue()
formatR(cor(mtcars$mpg, mtcars$disp)); #> [1] "-.85"