as.matrix.semivariance {krige} | R Documentation |
Convert semivariance to a matrix object
Description
Convert semivariance to a matrix object
Usage
## S3 method for class 'semivariance'
as.matrix(x, ...)
## S3 method for class 'semivariance'
as.data.frame(x, ...)
Arguments
x |
An |
... |
Additional arguments passed to |
Details
The defaults of semivariance methods give a list or numeric vector. These
methods can convert the semivariance output list and vector to matrix
or
data.frame
.
Value
A matrix containing the computed distance and semivariance.
Examples
## Not run:
# Summarize Data
summary(ContrivedData)
# Empirical semivariance for variable y
raw.var <- semivariance(x=ContrivedData$y,coords = cbind(ContrivedData$s.1,
ContrivedData$s.2))
as.matrix(raw.var)
# Estimation using metropolis.krige()
#' # Set seed
set.seed(1241060320)
M <- 100
#M<-10000
contrived.run <- metropolis.krige(y ~ x.1 + x.2, coords = c("s.1","s.2"),
data = ContrivedData, n.iter = M, range.tol = 0.05)
# Parametric semivariance
parametric.var <- semivariance(contrived.run)
as.matrix(parametric.var)
as.data.frame(parametric.var)
## End(Not run)
[Package krige version 0.6.2 Index]