How can I create a correlation matrix in R without removing null values?

im trying to use correlation matricies in r my data has bunch of null or n/a values my current approach is to convert these null values to 0 this works but it results in an inaccurate matrix because some columns that have correlation are overpowered by the 0 do you know of any solution to fix the na values?

Is this with the cor function in base r?
The documentation for it talks about NA issues and a 'use' parameter is available

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.