Jesse D Lecy
2007-Nov-22 05:52 UTC
[R] distance matrix to coordinate format for spatial stats
Greetings, I would like to use some of the spatial statistics functions in R, but I am having trouble entering data. My data is already in a distance matrix format, not an X Y coordinate format (each Xij cell in the matrix represens the distance from point i to j). Does anyone know of a way to convert a distance matrix to a ppp object in spatstat, or an X,Y coordinate system for other packages? Thanks, Jesse [[alternative HTML version deleted]]
Prof Brian Ripley
2007-Nov-22 06:56 UTC
[R] distance matrix to coordinate format for spatial stats
You can't do this uniquely (shifts, rotations and reflection do not change the distances), but cmdscale() will produce one reconstruction. On Thu, 22 Nov 2007, Jesse D Lecy wrote:> Greetings, > > I would like to use some of the spatial statistics functions in R, but I am having trouble entering data. My data is already in a distance matrix format, not an X Y coordinate format (each Xij cell in the matrix represens the distance from point i to j). Does anyone know of a way to convert a distance matrix to a ppp object in spatstat, or an X,Y coordinate system for other packages? > > Thanks, > Jesse-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Reasonably Related Threads
- exporting text output to pdf
- rbind has confusing result for custom sub-class (possible bug?)
- rbind has confusing result for custom sub-class (possible bug?)
- rbind has confusing result for custom sub-class (possible bug?)
- rbind on data.frame that contains a column that is also a data.frame