Learn R Programming

spatstat.sparse (version 3.1-0)

as.array.sparse3Darray: Convert Sparse Array to Full Array

Description

Convert a sparse three-dimensional array to a full three-dimensional array.

Usage

# S3 method for sparse3Darray
as.array(x, ...)

Value

An array (class "array") with the same dimensions as x

and the same type of entries as x.

Arguments

x

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

...

Ignored.

Author

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

Details

This is a method for the generic as.array for sparse three-dimensional arrays (class "sparse3Darray"). It converts the sparse three-dimensional array x into an array representing the same data.

See Also

sparse3Darray, as.sparse3Darray

Examples

Run this code
  M <- sparse3Darray(i=1:3, j=c(3,1,2), k=4:2,
                     x=runif(3), dims=rep(4, 3))
  V <- as.array(M)

Run the code above in your browser using DataLab