Learn R Programming

scidb (version 1.2-0)

all.equal: Test if two SciDB arrays are equal in content

Description

Test if two SciDB arrays are equal in content, ignoring SciDB chunk partitioning and overlap differences.

Usage

"all.equal"(target, current, ...) "all.equal"(target, current, ...)

Arguments

target
a scidb or scidbdf object.
current
a scidb or scidbdf object.
...
optional arguments that might be used in a future version.

Value

Return TRUE if the target SciDB array has the same dimensions, same attributes and types and same data at the same coordinates as the current array. Return FALSE otherwise.

See Also

scidb

Examples

Run this code
## Not run: 
# # Let's build a constant-valued 10x10 array:
# a <- build(pi, c(10,10), chunksize=c(5,7))
# 
# # The array is equal to itself!
# all.equal(a,a)    # (returns TRUE)
# 
# # Let's build an identically-shaped and valued array but with different
# # array chunk partitioning and overlap:
# b <- build(pi, c(10,10), chunksize=c(9,10), overlap=c(1,1))
# 
# # all.equal does not care about SciDB chunk sizes or overlap differences:
# all.equal(a,b)    # (returns TRUE)
# 
# # But differences in value or dimension matter:
# all.equal(a, b*2)  # (returns FALSE)
# ## End(Not run)

Run the code above in your browser using DataLab