R: Indexing methods

[,SparseArray,ANY,ANY-method {tractor.base} | R Documentation

## Indexing methods

### Description

Indexing methods for `SparseArray` and `MriImage` objects. For the latter class, arguments are passed to the equivalents for `array` or `SparseArray`, except where `i` is another `MriImage` object, where its nonzero region will be used to provide the indices. For `SparseArray`, indexing may be blank, or by numeric vector or matrix.

### Usage

    ## S4 method for signature 'SparseArray,ANY,ANY'
    x[i, j, ..., drop = TRUE]

    ## S4 replacement method for signature 'SparseArray,ANY,ANY'
    x[i, j, ...] <- value

    ## S4 method for signature 'MriImage,missing,missing'
    x[i, j, ..., drop = TRUE]

    ## S4 method for signature 'MriImage,ANY,missing'
    x[i, j, ..., drop = TRUE]

    ## S4 method for signature 'MriImage,missing,ANY'
    x[i, j, ..., drop = TRUE]

    ## S4 method for signature 'MriImage,ANY,ANY'
    x[i, j, ..., drop = TRUE]

    ## S4 method for signature 'MriImage,MriImage,missing'
    x[i, j, ..., drop = TRUE]

    ## S4 replacement method for signature 'MriImage,missing,missing'
    x[i, j, ...] <- value

    ## S4 replacement method for signature 'MriImage,ANY,missing'
    x[i, j, ...] <- value

    ## S4 replacement method for signature 'MriImage,missing,ANY'
    x[i, j, ...] <- value

    ## S4 replacement method for signature 'MriImage,ANY,ANY'
    x[i, j, ...] <- value

    ## S4 replacement method for signature 'MriImage,MriImage,missing'
    x[i, j, ...] <- value

### Arguments

`x` | An object of the appropriate type.
`i, j, ...` | Indexing objects.
`drop` | Scalar value: should unitary dimensions be dropped?
`value` | New value(s) for replacement forms.

### Value

A vector, array or `SparseArray`.

### Author(s)

Jon Clayden

[Package tractor.base version 3.2.2 Index]