Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

supportsArg

Tests if function supports a given argument


Description

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.

Usage

supportsArg(fun=stationary.cov, arg)

Arguments

fun

The function tested for support for whether it supports the argument arg as input

arg

The argument to check if fun supports using as input

Details

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.

Value

A logical indicating whether the given function supports use of the given argument

Author(s)

John Paige

See Also

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

Examples

################
#Test covariance function to see if it supports evaluation of 
#covariance matrix over upper triangle only
################

supportsArg(Rad.cov, "distMat")
supportsArg(Rad.cov, "onlyUpper")
supportsArg(stationary.cov, "distMat")
supportsArg(stationary.cov, "onlyUpper")
supportsArg(Exp.cov, "distMat")
supportsArg(Exp.cov, "onlyUpper")

fields

Tools for Spatial Data

v11.6
GPL (>= 2)
Authors
Douglas Nychka [aut, cre], Reinhard Furrer [aut], John Paige [aut], Stephan Sain [aut], Florian Gerber [aut], Matthew Iverson [aut], University Corporation for Atmospheric Research [cph]
Initial release
2020-10-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.