From spencer.graves at pdf.com  Sun Mar 18 06:23:17 2007
From: spencer.graves at pdf.com (Spencer Graves)
Date: Sat, 17 Mar 2007 22:23:17 -0700
Subject: [Rd] eigen returns NAs from a real matrix
Message-ID: <45FCCCC5.3060806@pdf.com>

Hi, All: 

      Attached please find a symmetric, indefinite matrix for which 
'eigen(...)$vectors' included NAs: 

 > load("eigenBug.Rdata")
 > sum(is.na(eigen(eigenBug)$vectors))
[1] 5670
 > sessioninfo()
Error: could not find function "sessioninfo"
 > sessionInfo()
R version 2.4.1 (2006-12-18)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  "methods" 
[7] "base"    

      Using EISPACK does NOT return NAs: 
 > sum(is.na(eigen(eigenBug, EISPACK=TRUE)$vectors))
[1] 0


      I traced the problem to the following line in 'eigen': 

            z <- if (!complex.x)
                .Call("La_rs", x, only.values, PACKAGE = "base")


      Comments?
      Best Wishes,
      Spencer Graves



[Rd] eigen returns NAs from a real matrix
Spencer Graves