From guillaume.yziquel at citycable.ch  Thu Jan 28 14:00:02 2010
From: guillaume.yziquel at citycable.ch (Guillaume Yziquel)
Date: Thu, 28 Jan 2010 14:00:02 +0100
Subject: [Rd] Problem with R math library.
In-Reply-To: <19297.33736.990250.454097@ron.nulle.part>
References: <4B617735.9010204@citycable.ch>
	<19297.33736.990250.454097@ron.nulle.part>
Message-ID: <4B618A52.6080805@citycable.ch>

Dirk Eddelbuettel a ?crit :
>
> Salut Guilluame,
>
> | > val norm_rand : unit -> float
> | > Random variates from the standard normal distribution. Bug: currently systematically returns -8.77332116900134373.
> | 
> | Any idea as to why the function systematically returns the same value? 
> | Is there a way the math library should be initialised?
> 
> I think it is pretty clearly documented in R-exts:
> 
>   However, before these are used, the user must call
>   
>        GetRNGstate();
>   
>   and after all the required variates have been generated, call
>   
>        PutRNGstate();
>   
>   These essentially read in (or create) `.Random.seed' and write it out
>   after use.

Fair enough. I admit I've been busy with low detail stuff, and omitted 
to come back to R-exts.

However, I have another question on which I do not find information (I 
found it once, but do not know how to find it again...): What's the big 
difference between using the R mathematical library in standalone mode 
and not in standalone mode? How does it translate in terms of C 
directives and linking modalities? I've noticed the MATHLIB_STANDALONE 
macro, but I do not know how I should use it...

All the best,

-- 
      Guillaume Yziquel
http://yziquel.homelinux.org/



[Rd] Problem with R math library.
Guillaume Yziquel