My apologies:

When reviewing my initial email I made a typo -- what I needed was dggev,
not dgeev.  I have confirmed that my function reproduces the scipy outputs
I mentioned in my first email.  The function is part of lapack.  I'm not an
R noob, I just haven't dealt with external Fortran or C calls before.

The reason I need it is that I am trying to port an existing python/IDL
algorithm to R (iMad/RADCAL, located at
http://mcanty.homepage.t-online.de/software.html).  The algorithm is fairly
complex so I'm trying to reproduce it line-by-line as closely as possible
before going back and improving its efficiency using various R
functions  (checking the inputs and the outputs between R and the python
code each step).  This algorithm does a weighted canonical correlation
analysis which does not apparently exist in other CCA R packages.

So, my main question at this point is given I can call dggev via .Fortran()
and get the outputs I want, what is the best way to package this up with a
dyn.load() statement that would work on any R install that has the lapack
libraries available to it?

--j


> Yes. Stop this.
>
> You are completely on the wrong track and  getting yourself into a real
> muddle.
>
> 1. you are mixing up dgeev and dggev. You are using the dggev arguments to
> call dgeev. Even if you got it all correct this would result in nasty
> errors.
> 2. La_dgeev doesn't exist in the R sources (nor does it exist in Lapack)
> and you don't need to use dgeev. See below.
>
> Since you are a "noob" I would advise you to not try and interface with
> Fortran or C at this moment.
>
> It is possible to interface with dggev for generalized eigenvalues but it
> is not a straightforward and easy job to do.
> I've had a look at the R and C code used in the R sources to interface
> with dgeev. It would need a lot of TLC.
>
> As I told you before: R provides a function eigen for calculating "normal"
>  eigenvalues end eigenvectors.
>
> It's probably a good idea to explain why you need generalized eigenvalues.
> Then someone may be able to come up with suggestions and/or alternatives.
>
> Berend
>
>


-- 
Jonathan A. Greenberg, PhD
Assistant Professor
Department of Geography and Geographic Information Science
University of Illinois at Urbana-Champaign
607 South Mathews Avenue, MC 150
Urbana, IL 61801
Phone: 415-763-5476
AIM: jgrn307, MSN: jgrn...@hotmail.com, Gchat: jgrn307, Skype: jgrn3007
http://www.geog.illinois.edu/people/JonathanGreenberg.html

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to