[R] Computing generalized eigenvalues

Douglas Bates dmbates at gmail.com
Mon Jun 20 18:54:29 CEST 2005


On 20 Jun 2005 17:41:13 +0200, Peter Dalgaard <p.dalgaard at biostat.ku.dk> wrote:
> Joshua Gilbert <joshuacgilbert at gmail.com> writes:
> 
> > > > As I understand it, Lapack __can__ computer them
> > > > (http://www.netlib.org/lapack/lawn41/node111.html) and R can use
> > > > Lapack. If there is no function already, can I access Lapack from R
> > > > and use those routines directly?
> > >
> > > Yes, you can: for real matrices the requisite routines are already
> > > compiled into R.  See DGGES or DGGEV.
> > >
> >
> > help.search('dggev') doesn't return anything. How do I access these routines?
> 
> It's not *that* easy! You need to roll your own interface; take a look
> at the implementation in solve.default. You likely also need to
> construct the counterpart to La_dgesv.

Generally it is easier to put the interface code into a package and include

PKG_LIBS = ${LAPACK_LIBS} ${BLAS_LIBS}

in src/Makevars




More information about the R-help mailing list