Re: [Rd] .Call in R

2011-11-20 Thread Raymond
I agree with Martin that this might not be suitable for a C solution. -- View this message in context: http://r.789695.n4.nabble.com/Call-in-R-tp4080721p4087141.html Sent from the R devel mailing list archive at Nabble.com. __ R-devel@r-project.org ma

Re: [Rd] .Call in R

2011-11-18 Thread Karl Forner
Yes indeed. My mistake. On Fri, Nov 18, 2011 at 4:45 PM, Joris Meys wrote: > Because if you calculate the probability and then make uniform values, > nothing guarantees that the sum of those uniform values actually is > larger than 50,000. You only have 50% chance it is, in fact... > Cheers > Jo

Re: [Rd] .Call in R

2011-11-18 Thread Joris Meys
Because if you calculate the probability and then make uniform values, nothing guarantees that the sum of those uniform values actually is larger than 50,000. You only have 50% chance it is, in fact... Cheers Joris On Fri, Nov 18, 2011 at 4:08 PM, Karl Forner wrote: > Hi, > > A probably very naiv

Re: [Rd] .Call in R

2011-11-18 Thread Martin Morgan
On 11/18/2011 07:08 AM, Karl Forner wrote: Hi, A probably very naive remark, but I believe that the probability of sum( runif(1) )>= 5 is exactly 0.5. So why not just test that, and generate the uniform values only if needed ? My thought as well, but actually the deviates need to have

Re: [Rd] .Call in R

2011-11-18 Thread Karl Forner
Hi, A probably very naive remark, but I believe that the probability of sum( runif(1) ) >= 5 is exactly 0.5. So why not just test that, and generate the uniform values only if needed ? Karl Forner On Thu, Nov 17, 2011 at 6:09 PM, Raymond wrote: > Hi R developers, > >I am new to th

Re: [Rd] .Call in R

2011-11-17 Thread Dirk Eddelbuettel
On 17 November 2011 at 09:09, Raymond wrote: | Hi R developers, | | I am new to this forum and hope someone can help me with .Call in R. | Greatly appreciate any help! | | Say, I have a vector called "vecA" of length 1, I generate a vector | called "vecR" with elements randomly gener

[Rd] .Call in R

2011-11-17 Thread Raymond
Hi R developers, I am new to this forum and hope someone can help me with .Call in R. Greatly appreciate any help! Say, I have a vector called "vecA" of length 1, I generate a vector called "vecR" with elements randomly generated from Uniform[0,1]. Both vecA and vecR are of double typ