as.matrix.semivariance function

Convert semivariance to a matrix object

Convert semivariance to a matrix object

## S3 method for class 'semivariance' as.matrix(x, ...) ## S3 method for class 'semivariance' as.data.frame(x, ...)

Arguments

  • x: An semivariance object created by semivariance or exponential.semivariance.

  • ...: Additional arguments passed to as.matrix and as.data.frame

    methods. Not supported for semivariance object.

Returns

A matrix containing the computed distance and semivariance.

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.

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)
  • Maintainer: Jason S. Byers
  • License: GPL (>= 2)
  • Last published: 2022-05-01

Useful links