I would like to create a correlation plot containing the correlation coefficients and the P values. But my correlation output is data. frame and not a matrix. How do I create a correlation matrix from scratch manually without cor test. Because the method of my correlation is the "distance method" which is not available in the cor test. Hence, I used the package called "correlation" that gives me the Coefficient values and the P-values except they are in a table and I cannot create a corr plot from them. I used the function matrix.data and as.matrix , both give me the error - The matrix is not in [-1, 1]! . Could someone help in creating a corr plot using the distance method?
Can you add the data frame to your post?
dput(df)
Unfortunately, I am not allowed to share the data frame in a public forum. But I will attach the image of how the data output looks like.