Learn R Programming

ROI (version 0.2-1)

equal: Compare two Objects

Description

The utility function equal can be used to compare two ROI objects and is mainly used for testing purposes.

Usage

equal(x, y, ...)
"equal"(x, y, ...)
"equal"(x, y, ...)
"equal"(x, y, ...)
"equal"(x, y, ...)
"equal"(x, y, ...)
"equal"(x, y, ...)
"equal"(x, y, ...)
"equal"(x, y, ...)
"equal"(x, y, ...)

Arguments

x
an R object to be compared with object y.
y
an R object to be compared with object x.
...
optional arguments to equal.

Value

TRUE if x and y are equal FALSE otherwise.

Examples

Run this code
## compare numeric values
equal(1e-4, 1e-5, tol=1e-3)
## L_constraint
lc1 <- L_constraint(diag(1), dir=c("=="), rhs=1)
lc2 <- L_constraint(diag(2), dir=c("==", "<="), rhs=1:2)
equal(lc1, lc1)
equal(lc1, lc2)

Run the code above in your browser using DataLab