>
, <
,
>=
, <=< code="">, ==
, and !=
for hyperSpec
objects.
all.equal
checks the equality of two hyperSpec objects.=<>
hyperSpec
objects or one
hyperSpec
object and matrix of same size
as hyperSpec[[]]
or a scalar (numeric of length 1).hyperSpec
objects that are tested for equalityall.equal
when testing the slots of the hyperSpec
objectslabel
be checked?
If the labels differ only in the order of their entries, they are conidered equal.label
be checked?As hyperSpec
objects must have numeric spectra matrices,
the resulting matrix of the comparison is returned directly.
all.equal
returns either TRUE
, or a character vector describing the differences.
In conditions, the result must therefore be tested with isTRUE
.
#S4 method for signature 'hyperSpec,hyperSpec':
#S4 method for signature 'hyperSpec,matrix':
#S4 method for signature 'matrix,hyperSpec':
#S4 method for signature 'hyperSpec,numeric':
#S4 method for signature 'numeric,hyperSpec':
e1 > e2
`>` (e1, e2)
e1 < e2
e1 >= e2
e1 <= e2<="" code="">=>
e1 == e2
e1 != e2
all.equal(target, current, ..., check.column.order = FALSE, check.label = FALSE, check.log = FALSE)
>
, <
,
>=
, <=< code="">, ==
, and !=
work on the
spectra matrix of the hyperSpec
object. They have their
usual meaning (see Comparison
).
The operators work also with one hyperSpec
object and a numeric (scalar) object
or a matrices of the same size as the spectra matrix of the hyperSpec
object. With numeric vectors sweep
might be more appropriate.
If you want to calculate on the data.frame
hyperSpec@data
, you
have to do this directly on hyperSpec@data
.
=<>
sweep-methods
for calculations involving a vector and
the spectral matrix.
S4groupGeneric
for group generic methods. Comparison
for the base comparison functions.
Arith
for arithmetic operators,
Math
for mathematical group generic
functions (groups Math and Math2) working on hyperSpec
objects.
all.equal
and isTRUE
flu [,,445 ~ 450] > 300
all (flu == flu[[]])
Run the code above in your browser using DataLab