There are multiple ways of getting this. One of the ways is it to use the GUI called rattle.
Follow these steps:
rattle() – To start the GUI
Go to data and select the data you need, make sure it’s of the type data.frame
Go to explore->correlation