Evaluate Expression Involving Function Arrays
Evaluates any expression involving one or more function arrays
and returns another function array.
eval.fasp(expr, envir, dotonly=TRUE)
- An expression.
- Optional. The environment in which to evaluate the expression.
- Logical. Passed to
This is a wrapper to make it easier to perform pointwise calculations with the arrays of summary functions used in spatial statistics.
A function array (object of class
"fasp") can be regarded as a matrix
whose entries are functions. Objects of this kind
are returned by the command
X is an object of class
eval.fasp(X+3) effectively adds 3 to the value of
every function in the array
X, and returns
the resulting object.
Y are two objects of class
which are compatible (for example the arrays
must have the same dimensions). Then
eval.im(X + Y) will add the corresponding functions in
each cell of the arrays
and return the resulting array of functions.
expr can be any expression involving
(a) the names of objects of class
"fasp", (b) scalar
constants, and (c) functions which are vectorised.
See the Examples.
eval.fasp determines which of the variable names
in the expression
expr refer to objects of class
The expression is then evaluated for each cell of the array
expr must be vectorised.
There must be at least one object of class
"fasp" in the expression.
All such objects must be compatible.
- Another object of class
# manipulating the K function data(amacrine) K <- alltypes(amacrine, "K") # expressions involving a fasp object eval.fasp(K + 3) L <- eval.fasp(sqrt(K/pi)) # expression involving two fasp objects eval.fasp(K - L)