Skip to content

geigen

Calculate Generalized Eigenvalues, the Generalized Schur Decomposition and the Generalized Singular Value Decomposition of a Matrix Pair with Lapack

v2.3 · May 30, 2019 · GPL (>= 2)

Description

Functions to compute generalized eigenvalues and eigenvectors, the generalized Schur decomposition and the generalized Singular Value Decomposition of a matrix pair, using Lapack routines.

Downloads

1.4K

Last 30 days

3228th

1.4K

Last 90 days

1.4K

Last year

CRAN Check Status

1 ERROR
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 ERROR
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (15 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
OK r-devel-linux-x86_64-fedora-clang

*


            
OK r-devel-linux-x86_64-fedora-gcc

*


            
ERROR r-devel-macos-arm64

examples

Running examples in ‘geigen-Ex.R’ failed
The error most likely occurred in:

> ### Name: geigen
> ### Title: Generalized Eigenvalues
> ### Aliases: geigen
> ### Keywords: algebra array
> 
> ### ** Examples
> 
> A <- matrix(c(14, 10, 12,
+               10, 12, 13,
+               12, 13, 14), nrow=3, byrow=TRUE)
> 
> B <- matrix(c(48, 17, 26,
+               17, 33, 32,
+               26, 32, 34), nrow=3, byrow=TRUE)
> 
> z1 <- geigen(A, B, symmetric=FALSE, only.values=TRUE)
> z2 <- geigen(A, B, symmetric=FALSE, only.values=FALSE )
> z2
$values
[1]  0.4187472  0.1318637 -0.4643638

$vectors
           [,1]       [,2]       [,3]
[1,] -0.3120432  1.0000000 -0.2372125
[2,] -0.2744767 -0.3316136 -0.8642553
[3,] -1.0000000 -0.5947330  1.0000000

$alpha
[1] 31.9414378  3.4003231 -0.2025574

$beta
[1] 76.2785706 25.7866569  0.4362041

> 
> # geigen(A, B)
> z1 <- geigen(A, B, only.values=TRUE)
> z2 <- geigen(A, B, only.values=FALSE)
> z1;z2
$values
[1] -0.4643638  0.1318637  0.4187472

$vectors
NULL

$alpha
NULL

$beta
NULL

$values
[1] -0.4643638  0.1318637  0.4187472

$vectors
           [,1]        [,2]       [,3]
[1,] -0.2891757 -0.17130678 0.03536261
[2,] -1.0535770  0.05680765 0.03110534
[3,]  1.2190576  0.10188180 0.11332600

$alpha
NULL

$beta
NULL

> 
> A.c <- A + 1i
> B.c <- B + 1i
> 
> A[upper.tri(A)] <- A[upper.tri(A)] + 1i
> A[lower.tri(A)] <- Conj(t(A[upper.tri(A)]))
> 
> B[upper.tri(B)] <- B[upper.tri(B)] + 1i
> B[lower.tri(B)] <- Conj(t(B[upper.tri(B)]))
> 
> isSymmetric(A)
[1] TRUE
> isSymmetric(B)
[1] TRUE
> 
> z1 <- geigen(A, B, only.values=TRUE)

 *** caught segfault ***
address 0x1, cause 'invalid permissions'

Traceback:
 1: geigen.zhegv(A, B, only.values)
 2: geigen(A, B, only.values = TRUE)
An irrecoverable exception occurred. R is aborting now ...
ERROR r-devel-macos-arm64

tests

  Running ‘testgsvd.R’ [0s/0s]
  Running ‘testgv.R’ [0s/0s]
  Running ‘testqz.R’ [0s/0s]
  Running ‘tgeigen1.R’ [0s/0s]
Running the tests in ‘tests/tgeigen1.R’ failed.
Complete output:
  > 
  > # from Octave's eigen test
  > library(geigen)
  > source("testgv.R")
  > 
  > A <- matrix(c(1, 2, -1, 1),nrow=2, byrow=TRUE)
  > B <- matrix(c(3, 3,  1, 2),nrow=2, byrow=TRUE)
  > 
  > z <- geigen(A,B)
  > testgv(A,B,z)
  [1] TRUE
  > 
  > A <- matrix(c(1, 2,  2, 1),nrow=2, byrow=TRUE)
  > B <- matrix(c(3,-2, -2, 3),nrow=2, byrow=TRUE)
  > 
  > z <- geigen(A,B)
  > testgv(A,B,z)
  [1] TRUE
  > 
  > z <- geigen(A,B, symmetric=TRUE)
  > testgv(A,B,z)
  [1] TRUE
  > 
  > # Complex
  > A <- matrix(c(1+3i, 2+1i, 2-1i, 1+3i),nrow=2, byrow=TRUE)
  > B <- matrix(c(5+9i, 2+1i, 2-1i, 5+9i),nrow=2, byrow=TRUE)
  > 
  > z <- geigen(A,B)
  > testgv(A,B,z)
  [1] TRUE
  > 
  > # Hermitian 
  > A <- matrix(c(3, 2+1i, 2-1i, 5),nrow=2, byrow=TRUE)
  > B <- matrix(c(5, 2+1i, 2-1i, 5),nrow=2, byrow=TRUE)
  > 
  > z <- geigen(A,B)
  
   *** caught segfault ***
  address 0x1, cause 'invalid permissions'
  
  Traceback:
   1: geigen.zhegv(A, B, only.values)
   2: geigen(A, B)
  An irrecoverable exception occurred. R is aborting now ...
OK r-devel-windows-x86_64

*


            
OK r-oldrel-macos-arm64

*


            
OK r-oldrel-macos-x86_64

*


            
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
ERROR r-devel-macos-arm64

examples

Running examples in ‘geigen-Ex.R’ failed
The error most likely occurred in:

> ### Name: geigen
> ### Title: Generalized Eigenvalues
> ### Aliases: geigen
> ### Keywords: algebra array
> 
> ### ** Examples
> 
> A <- matrix(c(14, 10, 12,
+               10, 12, 13,
+               12, 13, 14), nrow=3, byrow=TRUE)
> 
> B <- matrix(c(48, 17, 26,
+               17, 33, 32,
+               26, 32, 34), nrow=3, byrow=TRUE)
> 
> z1 <- geigen(A, B, symmetric=FALSE, only.values=TRUE)
> z2 <- geigen(A, B

Reverse Dependencies (15)

depends

Dependency Network

Dependencies Reverse dependencies conicfit CovTools HDTSA PEIP decp iTensor influenceAUC itdr loadings multivarious quadmatrix rMultiNet wideRhino guidedPLS multiblock geigen

Version History

new 2.3 Mar 9, 2026