[R] length of 'dimnames' [2] not equal to array extent- For Correlation Plot
Shivi Bhatia
shivipmp82 at gmail.com
Sat Mar 17 16:08:55 CET 2018
Created a new data set with 3 numeric variable to find correlation
CR1<- mar%>% as_data_frame%>% select(AGE, OLD_CAR_PURCHASE_YRS,
Total.Spend.With.AA)
had to convert it to a data frame, code:
as.matrix(as.data.frame(CR1))
Now i need to run a correlation plot for these 3 variables:
corrplot(CR1, method = "circle")
But i am getting this error:
Error in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow =
nr, : length of 'dimnames' [2] not equal to array extent
Researched and found Correlation
<https://stackoverflow.com/questions/43362420/length-of-dimnames-2-not-equal-to-array-extent-when-using-corrplot-function>that
corrplot requires a matrix however the error is still the same.
Regards, Shivi
[[alternative HTML version deleted]]
More information about the R-help
mailing list