0
votes

I'm trying to select & plot just one of these 9 attributes from my shape file, but nothing seems to work. Could you help?

enter image description here

1
Welcome to stackoverflow. For your next questions you should consider this advice: Why not upload images of code/errors when asking a question? <meta.stackoverflow.com/questions/285551/…>TarJae

1 Answers

2
votes

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

enter image description here

plot(nc['AREA']) # plot one of the attributes

enter image description here