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()
# NOT RUN { formatR(cor(mtcars$mpg, mtcars$disp)); # }
Run the code above in your browser using DataCamp Workspace