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
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"
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"