문제

I am using R. I want to run prcomp on a matrix. The code works fine with one installation of R on a Linux box but breaks on another identical (or so I thought) installation of R on a different Linux box. The codes are

dataf = read.table("~/data/testdata.txt")
pca = prcomp(dataf)

The error msg on the bad instance is

> dataf = read.table("~/data/testdata.txt")
> pca = prcomp(dataf)
Error in La.svd(x, nu, nv) :
  BLAS/LAPACK routine 'DGESDD' gave error code -12

Both instances of R has R version 2.9.2 (2009-08-24) and, as far as I can tell, all the R libraries and environmental variables are configured in identical ways as well.

So does anyone have suggestions on what might be wrong? What does that error code mean? (I searched internet and found nothing helpful...) Thanks a lot in advance!

도움이 되었습니까?

해결책

Your second box may have a broken Blas / Lapack installation. Unfortunately we cannot tell as you problem is not reproducible.

Here is another simple call to Blas / Lapack -- does this work for you?

R> crossprod(matrix(1:4, ncol=2))
     [,1] [,2]
[1,]    5   11
[2,]   11   25
R> 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top