Learn R Programming

spatstat.sparse (version 3.1-0)

bind.sparse3Darray: Combine Three-Dimensional Sparse Arrays

Description

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

Usage

bind.sparse3Darray(A, B, along)

Value

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

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.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.

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.

See Also

as.sparse3Darray, methods.sparse3Darray.

See abind for joining non-sparse arrays.

Examples

Run this code
  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)

Run the code above in your browser using DataLab