How to convert SpatialPointDataFrame to normal dataframe in r?

85 views Asked by At

I could load shp file in r:

setwd("something")
shp = readOGR(dsn = ".", layer = "shp_name")

Now, I want to convert that to a normal dataframe. What should I do?

1

There are 1 answers

0
Nirevezs On BEST ANSWER

I found the answer. It's just works like in general:

shp_df = as.data.frame(shp, xy = T)

You don’t always have to complicate things...