[R-sig-eco] Help PCNM analysis

Emma Gothe Emma.Gothe at slu.se
Wed Oct 5 10:25:12 CEST 2011


Dear list members!

I am trying to perform a PCNM analysis with function PCNM() (binary package provided by the provided by project Spatial ecological data analysis with R). I recently ran into a problem. I have a triangular distance matrix based on the shortest distance between my sampling points which I am using in the PCNM function instead of geographic coordinates. When I tried to perform the analysis on this distance matrix I got an error message (see below) that says I have "empty neighbor sites". I have used the same code and the exactly same type of distance matrices before and I did not have any problem. I have also searched my distance matrix for ev. missing values/other obvious errors and tried to search for a solution online but without any luck.

The file "Eucl stream order1.txt" is attached and my code is:

> dist.matr <- read.delim("Eucl stream order1.txt",row.names=1)
> dist <- as.dist(dist.matr)
> PCNM.auto=PCNM(dist)
Truncation level = 1092.48
Error in as.matrix(listw2sn(nb2listw(nb))[, 1:2]) :
  error in evaluating the argument 'x' in selecting a method for function 'as.matrix': Error in nb2listw(nb) : Empty neighbour sets found
Timing stopped at: 0.01 0 0.02

If anyone could help me to figure this out, and have suggestions for a solution I would be very greatful!

Best Emma

_______________________________________

Emma Göthe, PhD-student
Department of Aquatic Sciences and Assessment
Swedish University of Agricultural Sciences
Box 7050
750 07 Uppsala

Tel: +46-(0)18-673138
Fax: +46-(0)18-673156
OBS! New E-mail: emma.gothe at slu.se<mailto:emma.gothe at slu.se>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Eucl stream order1.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20111005/b33c7679/attachment.txt>


More information about the R-sig-ecology mailing list