How to convert SpatialPointDataFrame to normal dataframe in r?

98 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 best solutions below

0
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...