Dear all,
i'm using gdistance to model animal movement across landscape.
I have imported 11 rasters with roads, freeways, slope, use-of-land, lakes
(...) after recoding them with GRASS with a HSI value ranging from 1 to 4.
I've assigned zero to the NAs and then transformed all the rasters in
TransitionLayers (function=mean,directions=4) and later summed all of them
into a new transition:
> MY_transitionclass : TransitionLayer
dimensions : 2181, 1648, 3594288 (nrow, ncol, ncell)
resolution : 100.0049, 99.98945 (x, y)
extent : 1460708, 1625516, 4947383, 5165460 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000
+y_0=0 +ellps=intl +towgs84=-225,-65,9,0,0,0,0 +units=m +no_defs
values : conductance
matrix class: dsCMatrix
I applied two different geocorrections to this same transition:
> MY_correction<-geoCorrection(MY_transition,"c",F,scl=T)
> MY_Rcorrection<-geoCorrection(MY_transition,"r",F,scl=T)
My coords are 44 points where samples were taken (some further genetic
analyses are programmed), but i've also tried with only two points:
> coords<-read.csv("coords_md.csv",header=F)
> mycoords<-as.matrix(coords)
> my_spatialpoints<-SpatialPoints(mycoords)
Finally I calculated three geographical distance matrices:
> geodist <- pointDistance(my_spatialpoints,longlat=FALSE)
> summary(geodist) V1 V2 V3
V4 V5
Min. : 0 Min. : 0 Min. : 0 Min. : 0
Min. : 0
1st Qu.:133788 1st Qu.:133788 1st Qu.:133788 1st Qu.:133788
1st Qu.:133788
Median :133788 Median :133788 Median :133788 Median :133788
Median :135168
Mean :114704 Mean :117371 Mean :120166 Mean :123097
Mean :126174
3rd Qu.:137971 3rd Qu.:137971 3rd Qu.:137971 3rd Qu.:137971
3rd Qu.:137971
Max. :137971 Max. :137971 Max. :137971 Max. :137971
Max. :137971
NA's : 1 NA's : 2 NA's : 3
NA's : 4
(....)
> costdist <- costDistance(MY_correction, my_spatialpoints)
> summary(costdist) Min. 1st Qu. Median Mean 3rd Qu. Max.
0.00 0.00 21.92 68.53 210.90 244.70
> resdist <- resistanceDistance(MY_Rcorrection, my_spatialpoints)
> summary(resdist) Min. 1st Qu. Median Mean 3rd Qu. Max. 0 0 10220000
17070000 42860000 48300000
Now, I'd like to represent this measures but I couldn't find any
examples
of how to do it; plotting or imaging them doesn't return a meaningful
graph, I guess I should transform them somehow but I don't know how.
ANY help would be really appreciated, along with comments about the rest of
the work done.
Thanks in advance,
Lisa
[[alternative HTML version deleted]]