as.matrix.semivariance | R Documentation |
Convert semivariance to a matrix object
## S3 method for class 'semivariance' as.matrix(x, ...) ## S3 method for class 'semivariance' as.data.frame(x, ...)
x |
An |
... |
Additional arguments passed to |
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
.
A matrix containing the computed distance and semivariance.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.