[R-sig-Geo] Indicator kriging map creation

Matevž Pavlič matevz.pavlic at gi-zrmk.si
Sun Jul 24 18:22:29 CEST 2011

Hi list users, 


i am trying to do indicator kriging on a set of soild samples. 


I manage to do the predction of several classes  into a  "SpatialPixelsDataFrame" using the gstat object and predict() function. First a created a  gstat object of several soil classes which I later fitted with a linear model of coregonalization. 


After that i used predict() to generate a SpatialPixelsDataFrame which hold information about predictions, variance and covariances. 


I am mostly interested in predoctions of each class. I know how to create a spplot or levelplot of each of the predicted classes on its own, but what i would like to achieve is to create a map of this predictions, so that the class with highest value (from 0-1) would prevail on each of the grid cell. In this way i would get a map of soil classes. 


Attached is the reproducible sample and a picture of prediction that i would like covert to a map of Soil classes (SoilFactor). But i get stuck when i try to create a actual map. That means getting the max value of each pixels and assign a name to that pixel.


I hope i explained ok, if not i'll try again. 


Thanks for any ideas or help, m

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110724/d65f6e00/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temp.png
Type: image/png
Size: 16254 bytes
Desc: temp.png
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110724/d65f6e00/attachment.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110724/d65f6e00/attachment.txt>

More information about the R-sig-Geo mailing list