[R] CORRESPONDENCE ANALYSIS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[R] CORRESPONDENCE ANALYSIS

Enio Jelihovschi
Enio Jelihovschi" [hidden email]
Date: Fri, 20 Oct 2006 11:28:12 -0200
Subject: CORRESPONCE ANALYSIS
Dear All
I am new R user, trying to do correspondence analysis using the function mca
of the package MASS. My question is: In the following example

farms.mca <- mca(farms, abbrev = T) # Use levels as names

plot(farms.mca, cex = rep(0.7, 2), axes = F)
How can I change the "plot" so that each factor would get a different
colour, in order to enhance the visualization of the patterns.
Thank you, for any tip in that direction.
Enio Jelihovschi

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: [R] CORRESPONDENCE ANALYSIS

Henric Nilsson
On 2006-10-20 19:48, Enio Jelihovschi wrote:

> Enio Jelihovschi" [hidden email]
> Date: Fri, 20 Oct 2006 11:28:12 -0200
> Subject: CORRESPONCE ANALYSIS
> Dear All
> I am new R user, trying to do correspondence analysis using the function mca
> of the package MASS. My question is: In the following example
>
> farms.mca <- mca(farms, abbrev = T) # Use levels as names
>
> plot(farms.mca, cex = rep(0.7, 2), axes = F)
> How can I change the "plot" so that each factor would get a different
> colour, in order to enhance the visualization of the patterns.

Is this what you want:

text(farms.mca$cs, labels = dimnames(farms.mca$cs)[[1]],
      cex = 0.7, col = rep(2:5, c(4, 4, 3, 5)))

?


HTH,
Henric



> Thank you, for any tip in that direction.
> Enio Jelihovschi
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.