same_blockdim: Test for same block dimension

Description Usage Arguments See Also Examples

Description

same_blockdim tests if two multiblock objects have same block-dimension
same_parts tests if two multiblock objects have same partitions
same_dims tests if two multiblock objects have same dimensions
same_nblocks tests if two multiblock objects have same number of blocks

Usage

1

Arguments

x

a multiblock object

y

a multiblock object

See Also

blockdim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# blockvectors
bx = blockvector(1:10, parts=c(5,5), dims=2)
by = blockvector(1:10, parts=c(2,3,5), dims=3)

# blockmatrix
bm = blockmatrix(matrix(1:12, 3, 4), 3, c(2,2))

# test if same blockdimensions
same_blockdim(bx, bx) # TRUE
same_blockdim(bm, bm) # TRUE
same_blockdim(bx, bm) # FALSE

# test if same partitions
same_parts(bx, bx) # TRUE
same_parts(bm, bm) # TRUE
same_parts(bx, bm) # FALSE

# test if same dimensions
same_dims(bx, bx) # TRUE
same_dims(bm, bm) # TRUE
same_dims(bx, bm) # FALSE

# test if same number of blocks
same_nblocks(bx, bx) # TRUE
same_nblocks(bx, by) # FALSE

gastonstat/blockberry documentation built on May 16, 2019, 5:44 p.m.