Reputation: 9
I'm trying to select & plot just one of these 9 attributes from my shape file, but nothing seems to work. Could you help?
Upvotes: 0
Views: 2184
Reputation: 6567
It helps if you make a fully reproducible example so that fixers can run the code and be certain that they have resolved the issue.
Here is an example that you will have to modify for your own needs.
library(sf)
fname <- system.file("shape/nc.shp", package="sf") # read a shape file that comes with the sf package
nc <- st_read(fname)
plot(nc) # plot all the data
plot(nc['AREA']) # plot one of the attributes
Upvotes: 2