eval.hyper

0th

Percentile

Evaluate an Expression in Each Row of a Hyperframe

An expression, involving the names of columns in a hyperframe, is evaluated separately for each row of the hyperframe.

Keywords
manip, spatial, programming
Usage
eval.hyper(e, h, simplify = TRUE, ee = NULL)
Arguments
e
An Rlanguage expression to be evaluated.
h
A hyperframe (object of class "hyperframe") containing data.
simplify
Logical. If TRUE, the return value will be simplified to a vector whenever possible.
ee
Alternative form of e. See Details.
Details

This function evaluates the expression e in each row of the hyperframe h. The argument e should be an Rlanguage expression in which each variable name is either the name of a column in the hyperframe h, or the name of an object in the global environment. For each row of h, the expression will be evaluated so that variables which are column names of h are interpreted as the entries for those columns in the current row.

For example, if h has columns called A and B, then eval.hyper(A != B, h) inspects each row of h in turn, tests whether the entries in columns A and B are equal, and returns the $n$ logical values.

Value

  • Normally a list of length $n$ (where $n$ is the number of rows) containing the results of evaluating the expression for each row. If simplify=TRUE and each result is a single atomic value, then the result is a vector or factor containing the same values.

See Also

hyperframe, plot.hyperframe

Aliases
  • eval.hyper
Examples
# generate Poisson point patterns with intensities 10 to 100
   H <- hyperframe(L=seq(10,100, by=10))
   X <- eval.hyper(rpoispp(L),H)
Documentation reproduced from package spatstat, version 1.14-7, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.