1
votes

i have a txt data where each line is one lightning with lat, lon and intensity, i want to plot this upper a shapefile (polygon).

I cant read the shapefile, and i dont know how to plot the data upper the shapefile, anyone can help me? Maybe with some idea ..

1

1 Answers

1
votes

Package sp is your friend here.

library(sp)

data(meuse)

str(meuse)

coordinates(meuse) <- ~ x + y
plot(meuse)

You could also could give package sf a try. See vignettes.