From ripley at stats.ox.ac.uk  Fri Jan 21 04:51:51 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri Jan 21 04:51:57 2005
Subject: [Rd] How to use a C code in R
In-Reply-To: <1106264403.41f04153c5bf5@mail.encs.concordia.ca>
References: <1106264403.41f04153c5bf5@mail.encs.concordia.ca>
Message-ID: <Pine.LNX.4.61.0501210349120.29595@gannet.stats>

LAPACK is in Fortran.  See `Writing R Extensions' from the definition of 
what $(LAPACK_LIBS) provides, and for details of the corresponding C 
headers.

There are lot of examples amongst CRAN packages of calling LAPACK from C.

On Thu, 20 Jan 2005 xt_wang@cse.concordia.ca wrote:

> I have a c code which uses clapack. I want to integrate R with this code. It
> said that I create a R package including my c code. Then build it with putting
> PKG_LIBS = $(LAPACK_LIBS). I want to know the interface LAPACK_LIBS is Fortran
> or C? If it is written in Fortran, how can I build them together? If I can
> build them together, I still use the function in cLapack or the function in
> LAPACK_LIBS? Could you tell me how I can do in detail?

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] How to use a C code in R
Prof Brian Ripley