Hi

I would like to make a CA with visualisation of the clusters of the cluster analysis I've made. I'm using the package Vegan.

I've tried as an exercice this script:
data(dune)
data(dune.env)
mod <- cca(dune ~ Management, dune.env)
attach(dune.env)
plot(mod, type = "p", display="sites")
ordicluster(mod, hclust(vegdist(dune)), prune=3, col = "blue")

And wanted to do the same with mine
# transformation of dataset (Hellinger) and creating a distancematrix
KSSA6.hel<-decostand(KSSA6,"hel")
KSSA6.dishel<-dist(KSSA6.hel)
#clusteranalyse ward
KSSA6w.fc <- hclust(KSSA6.dishel^2, "ward")
clusterw7.fc <- cutree(KSSA6w.fc, k = 7)
# ca - ordinatie
KSSA6olhel.ca<- cca(KSSA6.ol.hel)
plot(KSSA6olhel.ca, type = "p", display="sites")
ordicluster(KSSA6olhel.ca, clusterw7.fc, prune=3, col = "blue")


str(KSSA6.hel)

'data.frame':  6206 obs. of  689 variables:

 $ ACEAANT: num  0 0 0 0 0 0 0 0 0 0 ...

 $ ACERPSE: num  0 0 0 0 0 0 0 0 0 0 ...

 $ ACHIMIL: num  0.0884 0 0 0 0 ...

 $ ACHIPTA: num  0 0 0 0 0 0 0 0 0 0 ...

 $ ADOXMOS: num  0 0 0 0 0 0 0 0 0 0 ...

 $ AEGOPOD: num  0 0 0 0 0 ...

...



str(KSSA6w.fc)

List of 7

 $ merge      : int [1:6205, 1:2] -1 -41 -5140 -4972 -2869 -5048 -5118 -6010 -5274 -1266 ...

 $ height     : num [1:6205] 0 0 0 0 0 0 0 0 0 0 ...

 $ order      : int [1:6206] 183 5638 3318 3608 4621 2562 5720 4560 2803 4978 ...

 $ labels     : chr [1:6206] "1" "2" "3" "4" ...

 $ method     : chr "ward"

 $ call       : language hclust(d = KSSA6.dishel^2, method = "ward")

 $ dist.method: chr "euclidean"

 - attr(*, "class")= chr "hclust"





str(clusterw7.fc)

 Named int [1:6206] 1 2 3 1 4 4 4 4 1 2 ...

 - attr(*, "names")= chr [1:6206] "1" "2" "3" "4" ...


But recieved this error message
ordicluster(KSSA6olhel.ca, clusterw7.fc, prune=3, col = "blue")
Error in cluster$merge : $ operator is invalid for atomic vectors

Does anyone knows what problem this is or give me an alternative?

Maud


Maud Raman

Scientist
Research Institute for Nature and Forest
Dept. Biodiversity & Natural Environment
Kliniekstraat 25, B-1070 Brussels, Belgium
Phone +32 (02) 525 02 87 / 0499-542659
Fax. + 32 (02) 558 18 05
maud.raman@inbo.be<mailto:maud.raman@inbo.be>
www.inbo.be<http://www.inbo.be>


	[[alternative HTML version deleted]]

