[R] trouble using R Mathlib as standalone
Dirk Eddelbuettel
edd at debian.org
Tue Jan 15 03:24:46 CET 2002
"Faheem" == Faheem Mitha <faheem at email.unc.edu> writes:
Faheem> OK, but what is the best way of making the warning go away? I
Faheem> would like to keep -pedantic. Shall I comment out the declation of
Dunno. I never use more than -Wall which, from my experience, catches
everything that is reasonable.
Faheem> log1p in Rmath.h Line 520)? Is that harmless? In any case, I think
Faheem> this qualifies as a minor bug.
Disagree. Remember that you are not getting an error, all you are getting is
a warning message. Maybe a nuisance, but not a bug.
Faheem> I want my function (q_gibbs_rand) to return a random number with
Faheem> the appropriate distribution every time I call it, and I don't want
Faheem> the burden of having to set the seed myself.
That's no burden -- an O(1) operation as I'd conjecture. OTOH it gives you
reproducibility, something that scientific inquiry cannot do without.
Faheem> I've decided to use u = runif(0,1); instead, which seems to
Faheem> work. It seems to compile OK, though I haven't tested it. Is this a
Faheem> reasonable alternative? I don't understand why I need to set the
Faheem> seed for unif_rand() and not for runif(), though.
Are you sure that this is the case? As I read the header file,
unif_rand(void) is a parameterless U [ and I don't know what the interval is,
probably on [0,1) ] whereas runif(double, double) correspond to the R
function for U on a given interval.
Dirk
--
Good judgment comes from experience; experience comes from bad judgment.
-- F. Brooks
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list