bind.sparse3Darray: Combine Three-Dimensional Sparse Arrays

View source: R/sparse3Darray.R

bind.sparse3DarrayR Documentation

Combine Three-Dimensional Sparse Arrays

Description

Two sparse arrays will be joined to make a larger sparse array.

Usage

bind.sparse3Darray(A, B, along)

Arguments

A,B

Sparse three-dimensional arrays (objects of class "sparse3Darray") or data acceptable to as.sparse3Darray.

along

The dimension along which the two arrays will be joined. An integer from 1 to 3.

Details

This operation is similar to rbind, cbind and abind. The two 3D arrays A and B will be joined to make a larger 3D array by concatenating them along the dimension specified by along.

The arguments A and B should be sparse three-dimensional arrays (objects of class "sparse3Darray") or data acceptable to as.sparse3Darray. They must have identical array dimensions except in the dimension specified by along.

Value

A sparse three-dimensional array (object of class "sparse3Darray").

Author(s)

\spatstatAuthors

.

See Also

as.sparse3Darray, methods.sparse3Darray.

See abind for joining non-sparse arrays.

Examples

  M <- sparse3Darray(i=1:3, j=c(3,1,2), k=4:2,
                     x=runif(3), dims=rep(4, 3))
  dim(M)
  U <- M[ , 1:3, ]
  dim(U)
  V <- bind.sparse3Darray(M, U, along=2)
  dim(V)

spatstat.sparse documentation built on Oct. 24, 2023, 9:08 a.m.