here it is an amended (more general) version
library(randomForest)
set.seed(1)
data(iris)
iris.rf <- randomForest(Species ~ ., iris, proximity=TRUE, keep.forest=TRUE)
x<-MDSplot(iris.rf, iris$Species)
#add legend
legend("topleft", legend=levels(iris.rf$predicted),
fill=brewer.pal(length(levels(
sorry, in fact it was a trivial question!
by just peeping into the function I've worked out this simple solution:
MDSplot(iris.rf, iris$Species)
legend("topleft", legend=levels(iris$Species), fill=brewer.pal(3, "Set1"))
thank you
> thanks andy
>
> it's a real honour form me to get a reply by yo
thanks andy
it's a real honour form me to get a reply by you;
I'm still a bit faraway from a proper grasp of the purpose of the plot...
may I ask you for a more technical (trivial) issue?
is it possible to add a legend in the MDS plot?
my problem is to link the color points in the chart to the fa
Yes, that's part of the intention anyway. One can also use them to do
clustering.
Best,
Andy
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Massimo Bressan
Sent: Monday, December 02, 2013 6:34 AM
To: r-help@r-project.org
Subject
4 matches
Mail list logo