Learn R Programming

motifcluster (version 0.2.3)

get_first_eigs: Compute first few eigenvalues and eigenvectors of a matrix

Description

Compute the first few eigenvalues (by magnitude) and associated eigenvectors of a matrix.

Usage

get_first_eigs(some_mat, num_eigs)

Value

A list with two entries: vals contains a length-num_eigs vector of the first few eigenvalues, and vects contains an nrow(some_mat) by num_eigs matrix of the associated eigenvectors.

Arguments

some_mat

Matrix for which eigenvalues and eigenvectors are to be calculated.

num_eigs

Number of eigenvalues and eigenvectors to calculate.