Briggs, Meredith M
2004-Aug-18 23:47 UTC
[R] Do you know if you can map a large minmum spanning tree in R?
Do you know if you can map in R? I have my minimum spanning tree, but as there are 1371 nodes (all over Australia) I'd like to be able to "graph" them as they actually would be on the map. Do you know if this is possible?
Michael Sumner
2004-Aug-19 00:18 UTC
[R] Do you know if you can map a large minmum spanning tree in R?
At 09:47 AM 8/19/2004, Briggs, Meredith M wrote:> Do you know if you can map in R? > I have my minimum spanning tree, but as there are 1371 nodes (all > over Australia) I'd like to be able to "graph" them as they actually > would be on the map. >Do you know if this is possible?You can certainly "map" in R. Depending on the coordinate system of your data . . . but, e.g. - if it's lat/lon - perhaps the easiest way is to install the "maps" package and you can add the continental outlines to an existing plot: ## display nodes code here . . . library(maps) map('world',add=T,xlim=c(109,157),ylim=c(-47,-7)) There are plenty of other options, if you have your own map data (or want to use another source). Feel free to provide more detail about your current plotting methods and coordinate system. Also, the package "mapdata" contains a high resolution continental dataset -"worldHires" Hope that helps, Mike. ############################################### Michael Sumner - PhD. candidate Maths and Physics (ACE CRC & IASOS) and Zoology (AWRU) University of Tasmania Private Bag 77, Hobart, Tas 7001, Australia Phone: 6226 1752