[R-sig-Geo] gdistance::shortestPath throws error "not a symmetric matrix"
Loris Bennett
loris.bennett at fu-berlin.de
Tue Feb 6 16:28:16 CET 2018
Hi,
Before I try to construct a reproducible example, which would probably
be quite time consuming, I wondered if this is a known problem. I am
calling 'shortestPath' thus
shortestPath(conduct_Tobler,
origin = sites at coords[1,],
goal = sites at coords[2,],
output="SpatialLines")
and get the error
Error in asMethod(object) :
not a symmetric matrix; consider forceSymmetric() or symmpart()
with the following traceback:
pairlist("stop(\"not a symmetric matrix; consider forceSymmetric() or
symmpart()\")",
"asMethod(object)",
"as(Laplacian,\"symmetricMatrix\")",
".Laplacian(x)", ".flowMap(x, ci, cj, tc)",
".local(x, origin, goal, ...)",
c("passage(conduct_Tobler, origin =sites at coords[5, ], goal =
sites at coords[3, ", " ])"),
c("passage(conduct_Tobler, origin = sites at coords[5, ], goal =
sites at coords[3, ", " ])"),
"eval(ei, envir)", "eval(ei, envir)",
"withVisible(eval(ei, envir))",
"source(\"./Skript.R\")")
However, a shape file is produced.
Any ideas what the problem might be?
Cheers,
Loris
--
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.bennett at fu-berlin.de
More information about the R-sig-Geo
mailing list