I need help on how to use R to draw a map. I have created an excel csv file with latitude and longitude of counties at the boundaries of the state I want to draw. However, I don’t know the right codes in R to use and get the map drawn. #R #Maps #howtodrawmapsinR #ggplot2 #Rmapcodes
CodePudding user response:
As simple as:
library(maps)
map('county', 'iowa', fill = TRUE, col = palette())
If you like to use the data from your .csv file, then please have a look on sf and sp libraries and get familiar with creating simple geometries, like SpatialPolygons.
