[Rd] do_gsub (PR#10540)

2008-01-02 Thread A . R . Runnalls
In character.c within R 2.6.1, the function do_gsub contains the following code: 1199if (STRING_ELT(pat, 0) == NA_STRING) { 1200PROTECT(ans = allocVector(STRSXP, n)); 1201for(i = 0; i < n; i++) SET_STRING_ELT(ans, i, NA_STRING); 1202UNPROTECT(1); 1203

Re: [Rd] setting the seed in standalone code using Rlib

2008-01-02 Thread Prof Brian Ripley
What is 'Rlib'? Did you mean embedded R (libR), rather than standalone Rmath? Applications making use of libR are not 'standalone': they use almost all of the installed R files. On Wed, 2 Jan 2008, David Faden wrote: > Hi, > > Is the below -- setSeed -- an okay way to set the seed in standalon

Re: [Rd] Error from wilcox.test

2008-01-02 Thread Prof Brian Ripley
On Wed, 2 Jan 2008, Prof Brian Ripley wrote: > Try exact = TRUE: the default switches to a normal approximation that will > not be adequate in your extreme example. I've modified the code in R-devel to give an answer in such extreme cases, but note that the p-value is pretty inaccurate, and so i

[Rd] setting the seed in standalone code using Rlib

2008-01-02 Thread David Faden
Hi, Is the below -- setSeed -- an okay way to set the seed in standalone applications making use of Rlib? It seems to work as expected. Is there a better way to do it? (I'm also looking at do_setseed but am unsure what to supply as op. findFun("set.seed", R_GlobalEnv)?) Thanks much. -- David Fad