When running irlba on a big.matrix as in the example from the vignette (on 
Windows R 2.15.2 64 bit)  it returns with an error (see below). irlba works 
fine on a regular R matrix

> library(bigalgebra)
> library(irlba)
Loading required package: Matrix
Loading required package: lattice
>  matmul <- function(A, x, transpose=FALSE)
+   {
+   if(transpose) {return(t( t(x) %*% A))}# i.e., t(A) %*% x
+   return (A %*% x)
+   }
>  set.seed(1)
>  A <- matrix(rnorm(100),10)
>  a <- as.big.matrix(A)
>  La <- irlba(a, nu=2, nv=2, matmul=matmul)
Error in W[, j] <- matmul(A, V[, j, drop = FALSE]) :
  number of items to replace is not a multiple of replacement length
>  LA <- irlba(A, nu=2, nv=2, matmul=matmul)
>  LA$d
[1] 5.154081 4.816501
Any clues or is this a bug with the package integration?

Cheers,
Gavan

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to