Learn R Programming

geostatsp (version 2.0.6)

variog: Compute Empirical Variograms and Permutation Envelopes

Description

These are wrappers for c( '\\code{variog} in the \\code{geoR} package', '\\command{\\link[geoR]{variog}}' )[1+requireNamespace('geoR', quietly=TRUE)] and c( '\\code{variog.mc.env} in the \\code{geoR} package', '\\command{\\link[geoR]{variog.mc.env}}' )[1+requireNamespace('geoR', quietly=TRUE)].

Usage

variog(geodata, ...)
# S3 method for SpatVector
variog(geodata, formula, ...)
# S3 method for default
variogMcEnv(geodata, ...)
# S3 method for SpatVector
variogMcEnv(geodata, formula, ...)

Value

As c( '\\code{variog} in the \\code{geoR} package', '\\command{\\link[geoR]{variog}}' )[1+requireNamespace('geoR', quietly=TRUE)]

and

c( '\\code{variog.mc.env} in the \\code{geoR} package', '\\command{\\link[geoR]{variog.mc.env}}' )[1+requireNamespace('geoR', quietly=TRUE)]

Arguments

geodata

An object of class SpatVector or of a class suitable for c( '\\code{variog} in the \\code{geoR} package', '\\command{\\link[geoR]{variog}}' )[1+requireNamespace('geoR', quietly=TRUE)]

formula

A formula specifying the response variable and fixed effects portion of the model. The variogram is performed on the residuals.

...

additional arguments passed to c( '\\code{variog} in the \\code{geoR} package', '\\command{\\link[geoR]{variog}}' )[1+requireNamespace('geoR', quietly=TRUE)]

See Also

c( '\\code{variog} in the \\code{geoR} package', '\\command{\\link[geoR]{variog}}' )[1+requireNamespace('geoR', quietly=TRUE)] and c( '\\code{variog.mc.env} in the \\code{geoR} package', '\\command{\\link[geoR]{variog.mc.env}}' )[1+requireNamespace('geoR', quietly=TRUE)]

Examples

Run this code
data("swissRain")
swissRain = unwrap(swissRain)
swissRain$lograin = log(swissRain$rain)
swissv= variog(swissRain, formula=lograin ~ 1,option="bin")
swissEnv = variogMcEnv(swissRain, lograin ~ 1, obj.var=swissv,nsim=9) 
if(!is.null(swissv)){
	plot(swissv, env=swissEnv, main = "Swiss variogram")
}

Run the code above in your browser using DataLab