Re: [R] GSL in C code for R

2010-04-30 Thread alexander russell
Hello,
I'm following this, since it seems I'm having to try to get C code going in
order to estimate dynamic models from biological data.Without saying
that gsl and related packages are proving to be obdurate, and knowing that R
is proving to be an excellent solution to the widest range of statistical
problems, is there a way to estimate dynamic/ode models from biological data
that uses R?

regards,
Alexander(I add that my attempts with James W. Haefner's c programming
course from "Modeling Biological Systems" is the precursor here.)

On Sat, Apr 17, 2010 at 3:56 AM, Prof Brian Ripley wrote:

> 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:cbe...@tajo.ucsd.edu   UC San Diego
>> http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego
>> 92093-0901
>>
>>
>>
> --
> Brian D. Ripley,  rip...@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, UKFax:  +44 1865 272595
>
>
> __
> 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.
>

[[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.


Re: [R] GSL in C code for R

2010-04-16 Thread Prof Brian Ripley

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:cbe...@tajo.ucsd.edu   UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901




--
Brian D. Ripley,  rip...@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, UKFax:  +44 1865 272595

__
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.


Re: [R] GSL in C code for R

2010-04-16 Thread Tobias Verbeke

Hi Sebastian,

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 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.

>

It may or may not be relevant to your query,
but there is a GSL wrapper package available
on CRAN which might be instructive or even
used directly for your purposes.

http://cran.r-project.org/web/packages/gsl/index.html

Best,
Tobias

__
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.


Re: [R] GSL in C code for R

2010-04-16 Thread Charles C. Berry

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 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.

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.


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:cbe...@tajo.ucsd.edu   UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

__
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.