crochet: Accessor methods for class 'SFBM'.

[,SFBM,ANY,ANY,ANY-methodR Documentation

Accessor methods for class SFBM.

Description

Accessor methods for class SFBM.

Usage

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

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

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

Arguments

x

A SFBM object.

i

A vector of indices (or nothing). You can use positive and negative indices, and also logical indices (that are recycled).

j

A vector of indices (or nothing). You can use positive and negative indices, and also logical indices (that are recycled).

...

Not used. Just to make nargs work.

drop

Not implemented; always return a sparse matrix (drop = FALSE).

Examples

spmat <- Matrix::Diagonal(4, 0:3)
spmat[4, 2] <- 5
spmat[1, 4] <- 6
spmat[3, 4] <- 7
spmat

X <- as_SFBM(spmat)
X[1:3, 2:3]
X[, 4]   # parameter drop is not implemented
X[-1, 3:4]
X$dense_acc(2:4, 3:4)

X2 <- as_SFBM(spmat, compact = TRUE)
X2[1:3, 2:3]
X2$dense_acc(1:3, 2:3)


bigsparser documentation built on Sept. 11, 2024, 8:29 p.m.