Wrapper for randKmap, generate 2D map
genMap(DataObj = NULL, seed = 80, krig = 2, Vpsill = 5, Vrange = 0.2,
Vnugget = 0.2, Vmean = 8, typeMod = "Exp", nPointsK = 1000,
boundary = list(x = c(0, 0, 1, 1, 0), y = c(0, 1, 1, 0, 0)), disp = 0,
FULL = FALSE)
=NULL: simulated data with seed or a data frame with real data
numeric, seed used to randomly generate data points
numeric, 1: kriging with vgm model, 2: inverse distance kriging
numeric parameter of the variogram model,
numeric parameter of the variogram model,
numeric parameter of the variogram model,
numeric parameter of the variogram model,
type of variogram model (see vgm) "Gau", "Sph", "Exp"
number of generated points after kriging
list, contains x and y coordinates of map boundaries
numeric,
logical, if TRUE the returned list is complete
a map object as a list with components
simulated or real raw data within the boundary
grid step
kriged data as a SpatialPointsDataFrame
kriged data in form of a grid-useful for image plots.
list of neighbours of each kriged data point
list of areas of Voronoi polygons in the tesselation of kriged data
random fields model
vgm model
(x,y) list of boundary points
ratio used to normalize x data
Wrapper for randKmap, generates a 2D map with a Gaussian field, either by simulating data or by reading data in a data frame. Kriged data are normalized so that x-coordinates are between 0 and 1. y-coordinates are normalized with the same ratio used for x-coordinates. Kriging is either done with inverse distance interpolation, or with a variogram model. It creates a structure that contains the data and parameters necessary to perform a zoning. The structure is identical wether the data are simulated or not.
# NOT RUN {
m=genMap(seed=1,krig=2,disp=1,nPointsK = 200) #generates a map and plots data
mean(m$krigGrid) # mean of generated kriged data
# }
Run the code above in your browser using DataLab