[R-sig-eco] correlation plot in color

Manuel Esteban Lucas Borja M@nue|E@teb@n@Luc@@ @end|ng |rom uc|m@e@
Sun Mar 22 02:32:32 CET 2020


Dear all,



First of all, I hope this email will find you well.



I am working with a biological dataset (please see in attachment) composed by 5 variables. The columns EMF, Biodiversity, MDS1 and MDS2 are numerical variables whereas T is a categorical one.



I would like to obtain a correlation chart showing correlation coefficients, histograms and different colours for each observation following the categorical variable "T". Please see below the initial chart I got but in which observations are not classified in different colours following the categorical variable "T".



This is the code I used with any positive result back.



corrMatOrder (dataset, histogram = T, pch = 19, method= spearman, family="CM Roman", col=c("red", "green3", "blue", "black")[code.levels(dataset$T)])



I work with Rstudio. Thank you very much for your time and help.

Best



Manuel




More information about the R-sig-ecology mailing list