rtopVariogram | R Documentation |
rtopVariogram will create binned variogram or cloud variogram of data with an areal support.
## S3 method for class 'rtop'
rtopVariogram(object, params = list(), ...)
## S3 method for class 'SpatialPolygonsDataFrame'
rtopVariogram(object, ...)
## S3 method for class 'SpatialPointsDataFrame'
rtopVariogram(object, formulaString, params=list(), cloud,
abins, dbins, ...)
## S3 method for class 'STSDF'
rtopVariogram(object, formulaString, params=list(), cloud,
abins, dbins, data.table = FALSE, ...)
object |
object of class |
formulaString |
formula that defines the dependent variable as a linear model
of independent variables; suppose the dependent variable has name |
params |
a set of parameters, used to modify the default parameters for
the |
cloud |
logical; if TRUE, calculate the semivariogram cloud, can be used to overrule the cloud parameter in params. |
abins |
possibility to set areal bins (not yet implemented) |
dbins |
possibility to set distance bins (not yet implemented) |
data.table |
an option to use data.table internally for the variogram computation for
|
... |
parameters to other functions called, e.g. gstat's
|
The function creates a variogram, either of type rtopVariogram
or
rtopVariogramCloud
. This variogram is based on the variogram
function from gstat, but has additional information about the spatial size or
length of the observations. An rtop-object with the variogram added is
returned if the function is called with an rtop-object as argument.
For spatio-temporal objects (STSDF
), the variogram is the spatially variogram, averaged for all time steps. There is a possibility to use data.table internally in this function, which can improve computation time for some cases.
The variogram cloud is similar to the variogram cloud from gstat
,
with the area/length added to the resulting data.frame. The binned variogram is
also based on the area or length, in addition to the distance between observations.
The bins equally distanced in the log10-space of the distances and areas (lengths).
The size of the bins is decided from the parameters amul
and dmul
,
defining the number of bins per order of magnitude (1:10, 10:100, and so on).
The distances between areas are in this function based on the centre of gravity.
Jon Olav Skoien
Skoien J. O., R. Merz, and G. Bloschl. Top-kriging - geostatistics on stream networks. Hydrology and Earth System Sciences, 10:277-287, 2006.
Skoien, J. O., Bloschl, G., Laaha, G., Pebesma, E., Parajka, J., Viglione, A., 2014. Rtop: An R package for interpolation of data with a variable spatial support, with an example from river networks. Computers & Geosciences, 67.
## Not run:
library(sf)
rpath = system.file("extdata",package="rtop")
observations = st_read(rpath,"observations")
# Create a column with the specific runoff:
observations$obs = observations$QSUMMER_OB/observations$AREASQKM
vario = rtopVariogram(observations, cloud = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.