Suppose, to calculate correlation of dataset mtcars we can use corr <- round(cor(mtcars), 1), or calculate and plot a correlation matrix using <
mtcars
corr <- round(cor(mtcars), 1)