dim,sparseLRMatrix-method {sparseLRMatrix} | R Documentation |
Check the dimension of a sparseLRMatrix
Description
Check the dimension of a sparseLRMatrix
Usage
## S4 method for signature 'sparseLRMatrix'
dim(x)
Arguments
x |
A sparseLRMatrix object. |
Value
Dimension of x
.
Examples
set.seed(528491)
n <- 50
m <- 40
k <- 3
A <- rsparsematrix(n, m, 0.1)
U <- Matrix(rnorm(n * k), nrow = n, ncol = k)
V <- Matrix(rnorm(m * k), nrow = m, ncol = k)
# construct the matrix, which represents A + U %*% t(V)
X <- sparseLRMatrix(sparse = A, U = U, V = V)
dim(X)
s <- svds(X, 5) # efficient
[Package sparseLRMatrix version 0.1.0 Index]