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!