0
summary(SCat_sp_E6)
Object of class SpatialPolygonsDataFrame
Coordinates:
         min        max
x -74.095072 -74.018988
y   4.647323   4.832934
Is projected: FALSE 
proj4string :
[+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs] 

summary(obj)
Object of class SpatialPolygonsDataFrame
Coordinates:
        min       max
x  21.99937 33.705704
y -18.07947 -8.270877
Is projected: FALSE 
proj4string :
[+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0] 

Are these sp files (SCat_sp_E6 and obj) equal in terms of proj4string? Can I do some transformation of the proj4string to obtain the same? Because after that I would like to apply polys.setup(), and the results are different. I am using hiv from GJRM package in R.

3
  • The proj4strings are essentially equal. Are the two datasets supposed to be of the same area? Any transformation you might do would not substantially change the values and wouldn't get the layers to overlay.
    – mkennedy
    Sep 30, 2020 at 22:32
  • The problem is when I apply polys.setup(). > summary(polE6) Length Class Mode polys 37 -none- list names0 0 -none- NULL names1 0 -none- NULL names2 0 -none- NULL and for the other data is > summary(pol) Length Class Mode polys 10 -none- list names0 10 -none- character names1 10 -none- character names2 0 -none- NULL
    – LACL
    Oct 1, 2020 at 10:16
  • the two datasets are not of the same area. I want to apply polys.setup() but it does not work with SCat_sp_E6 and since the example is with "obj" in the GJRM package, I wanted to check what were all the differences between those datasets, in terms of structure and class. And the only difference is that. So I don't understand why polys.setup() does not work with my data set.
    – LACL
    Oct 1, 2020 at 10:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.