[R-sig-Geo] gdistance resistanceDistance error

karljarvis karljarvis at gmail.com
Fri May 11 01:16:54 CEST 2012


Hi all,
As long as you're on the subject of the resistanceDistance function, I hope
you don't mind a different question.  In a homogeneous landscape, shouldn't
equidistant points have the same resistance values? There is no
directionality to this implementation of the circuitscape-type approach, so
in a symmetrical landscape the matrix should be symmetrical.  Right?

m <- matrix(1,10,10)
r <- raster(m)
t <- transition(r, mean, 8)
tg <- geoCorrection(t,type="c",multpl=FALSE)

x <- c(0.25,0.25,0.75,0.75)
y <- c(0.25,0.75,0.25,0.75)
xy <- cbind(x,y)

(rd <- resistanceDistance(tg,xy))

output:
         1        2        3
2 373.2277                  
3 243.5229 266.6885         
4 396.3933 322.7020 452.4068

The distance between each of these pairs of points are the same: (1,2),
(1,3), (2,4), (3,4), and these two are the same distance from each other:
(1,4), and (2,3).  So since all else is equal, why are their resistances
different?

Thanks,
Karl

--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/gdistance-resistanceDistance-error-tp7076485p7548673.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list