I need to extract climatic variables of many shapefiles. I managed to do it, 
but doing one at a time (I have to do this for 3000 species).
Well, I did the following:
first I downloaded the rasters of BIOCLIM> bios <-getData ("Worldclim" var = 
"bio", res = 2.5, T = download)
Ok, then I went with shapes (2 species did just to test).> teste_sp1 
<-readShapePoly ("sp1", IDVAR = NULL, proj4string = CRS (as.character (NA)), 
verbose = FALSE, repair = FALSE, FALSE = force_ring, delete_null_obj = FALSE, 
retrieve_ABS_null = FALSE)
Finally, I used a function to extract the variables of shapes> v <- extract 
(bios, sp1)

THE PROBLEM:The sp1 is a multi part polygon (23 features). I could make the 
average of these 23 lines and everything would be ok right? The problem is that 
some lines appears NA, and I have no idea why, and I can not just ignore that.
Do I need to join these parts into a single polygon? I tried this with 
"unionSpatialPolygons" but another error appears: Error in unionSpatialPolygons 
(sp1, IDS, threshold = NULL,: input lengths differ
Can anyone help me?

Att,
Maria Fernanda BonettiDoutoranda do Programa de Pós Graduação em Ecologia e 
Conservação - UFPRMestre em Ecologia e ConservaçãoPesquisadora do Instituto de 
Pesquisas Cananéia - IPeC                                      
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to