This question already has an answer here:

I have loaded the sp library in R and the rds file for a specific country (see here), now how can I extract the list of coordinates from this object?

When I ask for the names of the object, the result is:

 [1] "OBJECTID"      "ID_0"          "ISO"           "NAME_ENGLISH"  "NAME_ISO"     
[16] "WASPARTOF"     "CONTAINS"      "SOVEREIGN"     "ISO2"          "WWW"          
[21] "FIPS"          "ISON"          "VALIDFR"       "VALIDTO"       "POP2000"      
[26] "SQKM"          "POPSQKM"       "UNREGION1"     "UNREGION2"     "DEVELOPING"   
[31] "CIS"           "Transition"    "OECD"          "WBREGION"      "WBINCOME"     
[36] "WBDEBT"        "WBOTHER"       "CEEAC"         "CEMAC"         "CEPLG"        
[41] "COMESA"        "EAC"           "ECOWAS"        "IGAD"          "IOC"          
[46] "MRU"           "SACU"          "UEMOA"         "UMA"           "PALOP"        
[51] "PARTA"         "CACM"          "EurAsEC"       "Agadir"        "SAARC"        
[56] "ASEAN"         "NAFTA"         "GCC"           "CSN"           "CARICOM"      
[61] "EU"            "CAN"           "ACP"           "Landlocked"    "AOSIS"        
[66] "SIDS"          "Islands"       "LDC"  

Am I wrong to assume the list is among one of these?

marked as duplicate by Spacedman, tinlyx, Vince, xunilk, fdetsch Mar 26 '18 at 6:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Sp spatial classes store information in slots, which have the prefix @. Coordinates should be inside the @coords slot for each polygon.

But if you are not familiar with sp class structures it is better to use the sf package, which uses simple geometries.

1) You can convert your sp object to an sf class:

2) You can retrieve the coordinates with: CoordNew<-st_coordinates(New)

CoordNew is a matrix of x,y coordinates

Not the answer you're looking for? Browse other questions tagged or ask your own question.