supportsArg.Rd
Tests if the given function supports the given argument. Commonly used in fields code for determining if a covariance function supports precomputation of the distance matrix and evaluation of the covariance matrix over only the upper triangle.
supportsArg(fun=stationary.cov, arg)
The function tested for support for whether it supports the argument
arg
as input
The argument to check if fun
supports using as input
Currently only stationary.cov
and Exp.cov
support
evaluation of the covariance matrix over the upper triangle
(and diagonal) only via the onlyUpper argument and distance
matrix precomputation via the distMat argument.
A logical indicating whether the given function supports use of the given argument
stationary.cov
, Exp.cov
These covariance functions have the onlyUpper
option allowing
the user to evaluate the covariance matrix over the upper triangle and
diagonal only and to pass a precomputed distance matrix
################
#Test covariance function to see if it supports evaluation of
#covariance matrix over upper triangle only
################
supportsArg(Rad.cov, "distMat")
#> [1] FALSE
supportsArg(Rad.cov, "onlyUpper")
#> [1] FALSE
supportsArg(stationary.cov, "distMat")
#> [1] TRUE
supportsArg(stationary.cov, "onlyUpper")
#> [1] TRUE
supportsArg(Exp.cov, "distMat")
#> [1] TRUE
supportsArg(Exp.cov, "onlyUpper")
#> [1] TRUE