[R] How-to add to LDA ggplot axes the Percentage of variance explained

Lluis l.roca at gmx.us
Tue Aug 13 11:26:42 CEST 2013


Hi,

How can I add  to LDA ggplot axes the Percentages of variance explained?

Script:
/require(MASS)
require(ggplot2)
iris.lda<-lda(Species ~ Sepal.Length + Sepal.Width + Petal.Length +
Petal.Width,  data = iris)
datPred<-data.frame(Species=predict(iris.lda)$class,predict(iris.lda)$x)

 
ggplot(datPred, aes(x=LD1, y=LD2, col=Species) ) + geom_point( size = 4,
aes(color = Species))
/  
Thanks 



--
View this message in context: http://r.789695.n4.nabble.com/How-to-add-to-LDA-ggplot-axes-the-Percentage-of-variance-explained-tp4673603.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list