eig_decomp {destiny} | R Documentation

## Fast eigen decomposition using `eigs`

### Description

By default uses a random initialization vector that you can make deterministic using `set.seed` or override by specifying `opts = list(initvec = ...)`.

### Usage

    eig_decomp(M, n_eigs, sym, ..., opts = list())

### Arguments

`M` | A matrix (e.g. from the Matrix package) or a function (see `eigs`).
`n_eigs` | Number of eigenvectors to return.
`sym` | defunct and ignored.
`...` | Passed to `eigs`.
`opts` | Passed to `eigs`.

### Value

see `eigs`.

### Examples

    eig_decomp(cbind(c(1,0,-1), c(0,1,0), c(-1,0,1)), 2)

[Package destiny version 3.6.0 Index]