Description Usage Format Details Source References Examples
Soil physical and chemical data collected on a field in the Weissenstaedter Becken, Germany
1 |
This data frame contains the following columns:
x coordinates given in cm
y coordinates given in cm
number of the samples, which were taken in this order
moisture content [Kg/Kg * 100%]
nitrate nitrogen [mg/Kg]
total nitrogen [mg/Kg]
ammonium nitrogen [mg/Kg]
dissolved organic carbon [mg/Kg]
nitrous oxide [mg/Kg dried substance]
For technical reasons some of the data were obtained as differences of two measurements (which are not available anymore). Therefore, some of the data have negative values.
The data were collected by Wolfgang Falk, Soil Physics Group, University of Bayreuth, Germany.
Falk, W. (2000) Kleinskalige raeumliche Variabilitaet von Lachgas und bodenchemischen Parameters [Small Scale Spatial Variability of Nitrous Oxide and Pedo-Chemical Parameters], Master thesis, University of Bayreuth, Germany.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
## RFoptions(seed=NA) to make them all random again
################################################################
## ##
## a geostatistical analysis that demonstrates ##
## features of the package 'RandomFields' ##
## ##
################################################################
data(soil)
str(soil)
soil <- RFspatialPointsDataFrame(
coords = soil[ , c("x.coord", "y.coord")],
data = soil[ , c("moisture", "NO3.N", "Total.N", "NH4.N", "DOC", "N20N")],
RFparams=list(vdim=6, n=1)
)
dta <- soil["moisture"]
## plot the data first
colour <- rainbow(100)
plot(dta, col=colour)
## fit by eye
gui.model <- RFgui(dta)
## fit by ML
model <- ~1 + RMwhittle(scale=NA, var=NA, nu=NA) + RMnugget(var=NA)
(fit <- RFfit(model, data=dta))
plot(fit, method=c("ml", "plain", "sqrt.nr", "sd.inv"),
model = gui.model, col=1:8)
## Kriging ...
x <- seq(min(dta@coords[, 1]), max(dta@coords[, 1]), l=121)
k <- RFinterpolate(fit, x=x, y=x, data=dta)
plot(x=k, col=colour)
plot(x=k, y=dta, col=colour)
## what is the probability that at no point of the
## grid given by x and y the moisture is greater than 24 percent?
cs <- RFsimulate(model=fit@ml, x=x, y=x, data=dta, n=50)
plot(cs, col=colour)
plot(cs, y=dta, col=colour)
Print(mean(apply(as.array(cs) <= 24, 3, all))) ## about 40 percent ...
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.