[R-sig-eco] Error in La.svd(x, nu, nv) : error code 1 from Lapack routine 'dgesdd'

Duarte Viana viana.sptd at gmail.com
Mon May 14 17:06:46 CEST 2012


Thanks Jari for your help.

Changing the option of the svd function to LIMPACK=TRUE indeed
resolved the problem.

I just copy-paste the function svd to the console (maintaining the
name svd), changed LIMPACK=FALSE to LIMPACK=TRUE, and then assigned
the function to the namespace "base":

assignInNamespace("svd", svd, "base")

It worked!

Thanks again,

Duarte



On Mon, May 14, 2012 at 3:25 PM, Jari Oksanen <jari.oksanen at oulu.fi> wrote:
> We have had similar reports from many cases (for instance, from cca/rda functions in vegan). The problem is difficult to track. Cases that we have seen so far probably are problems in LAPACK library, and the kind of LAPACK used can depend on the version of R, version of LAPACK, compilers used, operating system and its version, computer hardware, phase of moon etc. Error code 1 from dgesdd should be a convergence problem.
>
> With presence/absence data there may not be much you can with the data. With quantitative data, rescaling of data has been helpful, but hardly with p/a (Hellinger transformation will also change data properties and is not data neutral: division of subtraction with some constant is data neutral and helps sometimes, but hardly with p/a data).
>
> The svd() function in R provides a R<1.7.0 compatibility option LINPACK = TRUE which has helped sometimes. We haven't added that as an option for svd() in cocorresp or vegan as it is documented only as a compatibility option for old R. However,  you can try editing the files to use LINPACK = TRUE to see if the problem vanishes (but NAMESPACE add some pain in using edited files).
>
> HTH, Jari Oksanen
> ________________________________________
> From: r-sig-ecology-bounces at r-project.org [r-sig-ecology-bounces at r-project.org] on behalf of Duarte Viana [viana.sptd at gmail.com]
> Sent: 14 May 2012 16:09
> To: r-sig-ecology at r-project.org
> Subject: [R-sig-eco] Error in La.svd(x, nu,     nv) : error code 1 from Lapack routine 'dgesdd'
>
> Hello all,
>
> When I perform a cross validation with the function "crossval" of the
> package cocorresp (for a co-correspondence analysis), I get the
> following error:
>
> Error in La.svd(x, nu, nv) : error code 1 from Lapack routine 'dgesdd'
>
> I think the problem is not in the function, as other people has had
> the same error for other types of model (see, for example,
> http://comments.gmane.org/gmane.comp.lang.r.ecology/2608). From this
> and other posts, I suppose it is a convergence problem.
>
> I am working with presence-absence species matrices, and the problem
> persists even if I transform the matrices with Hellinger
> transformation (although not at the same site).
>
> Does anyone know how to solve, or go around, this problem?
>
> Any advice would be most welcome.
> Thanks,
>
> Duarte
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



More information about the R-sig-ecology mailing list