The spatstat.sparse package defines three-dimensional sparse arrays, and supports standard operations on them. It also provides some utility functions for matrix calculations such as quadratic forms.
The spatstat.sparse package
defines a class of sparse three-dimensional arrays and supports standard operations on them (see Section Sparse 3D Arrays).
provides utility functions for matrix computations that are common in statistics, such as quadratic forms (see Section Matrix Utilities).
The code in spatstat.sparse was originally written for internal use within the spatstat package, but has now been removed and organised into a separate, stand-alone package which can be used for other purposes.
The main purpose of spatstat.sparse is to define a class of sparse three-dimensional arrays.
A is three-dimensional if it is indexed by
three integer indices, so that
A[i,j,k] specifies an element of
the array. The array is called sparse if only a small fraction of the
entries are non-zero. A sparse array can be represented economically
by listing only the entries which are non-zero.
The spatstat.sparse package defines the class
sparse3Darray of sparse three-dimensional arrays.
These arrays can have numeric, integer, logical, or complex
The package supports:
creation of sparse arrays from raw data
conversion to/from other data types
array indexing, extraction of entries, assignment of new values
arithmetic and logical operations
tensor operations (generalising matrix multiplication)
permutation of array dimensions
binding of several arrays into a single array
printing of sparse arrays.
The spatstat.sparse package uses the Matrix package to handle slices of three-dimensional arrays which are two-dimensional (sparse matrices) or one-dimensional (sparse vectors).
The main functions are:
||Create a sparse 3D array|
||Convert other data to a sparse 3D array|
||Permute a sparse array|
||arithmetic and logical operators|
||standard mathematical functions|
||mean, maximum etc|
||Convert sparse array to full array|
For other undocumented functions,
The package also includes some utilities for matrix calculations:
||sum of outer products of rows of a matrix|
||quadratic form involving rows of a matrix|
||bilinear form involving rows of a matrix|
||square root of a matrix|
||powers of a matrix|
This library and its documentation are usable under the terms of the “GNU General Public License”, a copy of which is distributed with R.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.