[R] GSL in C code for R
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Apr 16 22:56:48 CEST 2010
On Fri, 16 Apr 2010, Charles C. Berry wrote:
> On Fri, 16 Apr 2010, J. Sebastian Tello wrote:
>
>> Dear fellow R users,
>>
>> I am now investing time in learning how to use compiled C code to produces
>> functions that can be used in R. I am just starting, and there is much that
>> I need to learn, so I have a question that might be straight forward. I am
See the posting guide: this is not the list advised for non-R
programming questions.
>> learning how to use function in the C library GSL (gnu scientific library),
>> to write C code, that I then plant to use in R. Is there any problem in
>> doing this? I mean, using functions of GSL to write C funtions to then use
>> them in R? I just want to make sure that this approach is correct, before I
>> invest more time trying to figure out how to include GSL functions into my
>> C functions. Any commentaries, insights or advice will be highly
>> appreciated.
>
>
> per the posting guide ("Do Your Homework" section), you should do this:
>
> RSiteSearch("GSL")
>
> If you are considering doing something that might be submitted to
> BioConductor, you should read up on what they require:
>
> http://wiki.fhcrc.org/bioc/Package_Guidelines
>
> IIRC, they tend to discourage the use of external libraries.
Maybe they do, but at least one package, GLAD, requires gsl in a
rather non-standard way and several others have really arcane
requirements for external libraries, some of which will not install on
any of my systems.
There are I believe 3 CRAN packages (gsl, BayesPanel, segclust) make
use of gsl.
> The R API is rich with functions that provide a lot of what GSL has, so you
> might want to study that before committing to GSL.
I agree: people who use gsl to do things R already does have caused
problems in the past.
If you want to distribute your package you should be aware that gsl is
not written with any concessions to portability. It is a real pain to
port to Windows (but I have managed with some versions and 32- and
64-bit builds as used for CRAN are at
http://www.stats.ox.ac.uk/pub/Rtools/).
> HTH,
>
> Chuck
>
>>
>> Sebastian
>>
>> J. Sebasti?n Tello
>>
>>
>> Department of Biological Sciences
>> 285 Life Sciences Building
>> Louisiana State University
>> Baton Rouge, LA, 70803
>> (225) 578-4284 (office and lab.)
>>
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>>
>
> Charles C. Berry (858) 534-2098
> Dept of Family/Preventive
> Medicine
> E mailto:cberry at tajo.ucsd.edu UC San Diego
> http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
>
>
--
Brian D. Ripley, ripley at 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
More information about the R-help
mailing list