Output shapefile for the igraph network in R
问题 Hello I have a network in R using the igraph library Vertices: 616 Edges: 6270 Directed: TRUE No graph attributes. Vertex attributes: name, Lat, Lon. Edge attributes: V3. How can I generate two shapefiles for the Vertices and the Edges using the Lat, Lon info in the vertex? 回答1: You can do this using the sp and maptools packages. There are handy functions writePointsShape() and writeLinesShape() in maptools that will write to the ESRI shapefile format. Before doing this, it is necessary to