Hello again R-users, I didn't receive any answer regarding my last post on HSM. I think my question was not clear.. (sorry..). I try again to explain my problem:
so.. I have 3 different sites along the Mediterranean Sea with different extents, coordinates,....on which I performed a MADIFA analysis. Now, I want to produce a final HSM on these 3 sites using the MADIFA results. My problem is in "map" in the line command : pred <- predict(mad, map,..) I don't know how to prepare a total "map" with my 3 different SpatialPixelsDataFrame (how to merge, aggregate, mosaic....them together?) Below I report my MADIFA results and the structure of my 3 SPDFs: MADIFA $call: madifa(dudi = pc_mad, pr = pr_mad, scannf = FALSE, nf = 7) eigen values: 15.58 3.255 0.9557 0.6351 0.2338 ... $nf: 7 axes saved vectorlength modecontent 1 $pr418353 numeric vector of presence 2 $mahasu 418353 numeric squared Mahalanobis distances 3 $lw418353 numeric row weights 4 $cw418353 numeric column weights 5 $eig8numeric eigen values data.frame nrowncol content 1 $tab418353 8modified array 2 $li418353 7row coordinates 3 $l1418353 7row normed scores (variance weighted by $pr = 1) 4 $co87column coordinates 5 $cor87cor(habitat var., scores) for available points > str(SPDF_tuna_norm) Formal class 'SpatialPixelsDataFrame' [package "sp"] with 7 slots ..@ data:'data.frame':349272 obs. of8 variables: .. ..$ aspect: num [1:349272] 1.298 0.583 0.553 1.457 0.627 ... .. ..$ BPI: num [1:349272] 0.0684 0.0331 0.0251 0.0147 -0.0371 ... .. ..$ curvature: num [1:349272] 0 -0.0341 -0.001 0.0389 -0.0656 ... .. ..$ plan.curvature: num [1:349272] 0 -0.0239 -0.0008 0.0005 -0.0434 ... .. ..$ profile.curvature: num [1:349272] 0 -0.0104 -0.0003 0.0385 -0.023 ... .. ..$ depth: num [1:349272] -97.4 -97.5 -97.6 -97.6 -97.7 ... .. ..$ slope: num [1:349272] 0.0871 0.1205 0.0927 0.0685 0.092 ... .. ..$ TRI: num [1:349272] 0.0617 0.0811 0.0606 0.0581 0.0677 ... ..@ coords.nrs : num(0) ..@ grid:Formal class 'GridTopology' [package "sp"] with 3 slots .. .. ..@ cellcentre.offset: Named num [1:2] 594515 4669713 .. .. .. ..- attr(*, "names")= chr [1:2] "s1" "s2" .. .. ..@ cellsize: num [1:2] 1 1 .. .. ..@ cells.dim: int [1:2] 396 882 ..@ grid.index : int [1:349272] 1 2 3 4 5 6 7 8 9 10 ... ..@ coords: num [1:349272, 1:2] 594515 594516 594517 594518 594519 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : NULL .. .. ..$ : chr [1:2] "x" "y" ..@ bbox: num [1:2, 1:2] 594515 4669713 594911 4670595 .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:2] "x" "y" .. .. ..$ : chr [1:2] "min" "max" ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots .. .. ..@ projargs: chr "+proj=utm +zone=32 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" > str(SPDF_monte_norm) Formal class 'SpatialPixelsDataFrame' [package "sp"] with 7 slots ..@ data:'data.frame':48333 obs. of8 variables: .. ..$ aspect: num [1:48333] 5.498 0.303 1.288 1.298 0.785 ... .. ..$ BPI: num [1:48333] 5.18 6.14 6.8 5.69 6.2 ... .. ..$ curvature: num [1:48333] 0 0.19 1.03 -1.01 0 ... .. ..$ plan.curvature: num [1:48333] 0 0.175 0.132 -0.119 0 ... .. ..$ profile.curvature: num [1:48333] 0 0.0185 0.9835 -0.959 0 ... .. ..$ depth: num [1:48333] -32.6 -32.5 -32.7 -34.7 -35 ... .. ..$ slope: num [1:48333] 0.0298 0.2737 0.8512 0.8674 0.3622 ... .. ..$ TRI: num [1:48333] 0.0211 0.1896 1.176 1.1811 0.268 ... ..@ coords.nrs : num(0) ..@ grid:Formal class 'GridTopology' [package "sp"] with 3 slots .. .. ..@ cellcentre.offset: Named num [1:2] 608418 4685237 .. .. .. ..- attr(*, "names")= chr [1:2] "s1" "s2" .. .. ..@ cellsize: num [1:2] 1 1 .. .. ..@ cells.dim: int [1:2] 308 190 ..@ grid.index : int [1:48333] 169 170 171 172 173 175 176 177 178 179 ... ..@ coords: num [1:48333, 1:2] 608586 608587 608588 608589 608590 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : NULL .. .. ..$ : chr [1:2] "x" "y" ..@ bbox: num [1:2, 1:2] 608418 4685237 608726 4685427 .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:2] "x" "y" .. .. ..$ : chr [1:2] "min" "max" ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots .. .. ..@ projargs: chr "+proj=utm +zone=32 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" -- > str(SPDF_isuela_norm) Formal class 'SpatialPixelsDataFrame' [package "sp"] with 7 slots ..@ data:'data.frame':20748 obs. of8 variables: .. ..$ aspect: num [1:20748] 4.54 4.75 4.78 4.85 4.59 ... .. ..$ BPI: num [1:20748] -0.531 -0.458 -0.406 -0.295 -0.195 ... .. ..$ curvature: num [1:20748] 0 0.0201 -0.0561 0.0135 0.0678 ... .. ..$ plan.curvature: num [1:20748] 0 0 -0.0003 0.0002 0.0011 ... .. ..$ profile.curvature: num [1:20748] 0 0.0201 -0.0559 0.0133 0.0668 ... .. ..$ depth: num [1:20748] -56.8 -56.7 -56.6 -56.4 -56.2 ... .. ..$ slope: num [1:20748] 0.14 0.128 0.147 0.169 0.128 ... .. ..$ TRI: num [1:20748] 0.0996 0.1053 0.1226 0.139 0.1083 ... ..@ coords.nrs : num(0) ..@ grid:Formal class 'GridTopology' [package "sp"] with 3 slots .. .. ..@ cellcentre.offset: Named num [1:2] 511472 4907401 .. .. .. ..- attr(*, "names")= chr [1:2] "s1" "s2" .. .. ..@ cellsize: num [1:2] 1 1 .. .. ..@ cells.dim: int [1:2] 133 156 ..@ grid.index : int [1:20748] 1 2 3 4 5 6 7 8 9 10 ... ..@ coords: num [1:20748, 1:2] 511472 511473 511474 511475 511476 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : NULL .. .. ..$ : chr [1:2] "x" "y" ..@ bbox: num [1:2, 1:2] 511472 4907401 511605 4907557 .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:2] "x" "y" .. .. ..$ : chr [1:2] "min" "max" ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots .. .. ..@ projargs: chr "+proj=utm +zone=32 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" Summarizing my question: I would like to produce 1 habiat suitability map for 3 different sites from a MADIFA analysis performed on the 3 sites together.. Maybe I have to perform one MADIFA for each sites and then merge the results together in order to do the total HSM... If this is the case, how can I do that? Sorry if I write again regarding this topic but I am not able to find a solution... Thank you for your help. Bye, Michela ***************************************************************** Dr. Michela Giusti ISPRA Istituto Superiore per la Protezione e la Ricerca Ambientale Via Brancati, 60 00144 Roma Tel. +390650074746 [email protected] ***************************************************************** [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-geo
