[R-sig-eco] correlation plot in color

Drew Tyre @tyre2 @end|ng |rom un|@edu
Sun Mar 22 14:12:31 CET 2020


Manuel,

T may be getting interpreted as TRUE, not your variable name. Try renaming the variable to something else and see if that helps.

-- 
Drew Tyre
 
He/him/his
 
While I may be sending this email outside my normal office hours, 
I have no expectation to receive a reply outside of yours.
 
School of Natural Resources
University of Nebraska-Lincoln
416 Hardin Hall, East Campus
3310 Holdrege Street
Lincoln, NE 68583-0974
 
phone: +1 402 472 4054
fax: +1 402 472 2946
email: atyre2 using unl.edu
http://snr.unl.edu/tyre
http://drewtyre.rbind.io
 
“Anything worth doing is worth doing badly.”

* G. K. Chesterton

On 3/21/20, 8:32 PM, "R-sig-ecology on behalf of Manuel Esteban Lucas Borja" <r-sig-ecology-bounces using r-project.org on behalf of ManuelEsteban.Lucas using uclm.es> wrote:

    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
    
    
    _______________________________________________
    R-sig-ecology mailing list
    R-sig-ecology using r-project.org
    https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dsig-2Decology&d=DwIFAg&c=Cu5g146wZdoqVuKpTNsYHeFX_rg6kWhlkLF8Eft-wwo&r=aLEaSryyUcERVqcKVZl7lQ&m=8ZU0mK0lLpXPq2WJfDahUzu7C12RW7imeOWQ_rvGsiA&s=PaGMWGrC4sn6FfrSXEvZnzrBSounwJEENXLeoXL4Cjc&e= 
    



More information about the R-sig-ecology mailing list