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? 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 extract the lat/lon information from the graph vertices and put it into a SpatialPoints object for the