Hi to all I am new in R
I am trying to transform a spatialdataframe into a Spatial.Polygon file using the SptialEpi package with no success. This the code


library(SpatialEpi)
library(proj4)
polygon <- ADpoly$polygon$polygon
nrepeats <- ADpoly$polygon$nrepeats
names <- ADpoly$data$ADIDU
spatial.polygon <- polygon2spatial.polygon(polygon, coordinate.system== "+proj=lcc +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0" ,names, nrepeats)

ADpoly is my spatialdataframe projected in canada lambert conformal

and this is the error:

cannot evaluate the  'obj' when selecting a mthod for the 'coordinates' function

Please may someone help me?
	[[alternative HTML version deleted]]

