> Richard M Heiberger
> on Mon, 14 Aug 2017 14:36:40 -0400 writes:
> Please look at ?datasets::randu
> for David Donoho's translation of RANDU into R.
Thanks a lot, Rich, for pointing to this:
Indeed, the RANDU aka 'randu' data set has been part of R since
the last millenn
On 14/08/2017 2:18 PM, Huzefa Khalil wrote:
Hi Martin,
The corrected function would be
RANDU <- function(num) { return ((65539*num)%%(2^31)) }
You forgot the brackets for the return function.
Hence, what was returned was always (65539 * num)
Yes, this is one disadvantage of having a return
Please look at ?datasets::randu
for David Donoho's translation of RANDU into R.
On Mon, Aug 14, 2017 at 12:49 PM, Martin Møller Skarbiniks Pedersen
wrote:
> Dear all,
>
> I am trying to learn functions in R and 3D plotting so I decided to try
> to plot
> the famous bad PRNG Randu from IBM(1).
Hi Martin,
The corrected function would be
RANDU <- function(num) { return ((65539*num)%%(2^31)) }
You forgot the brackets for the return function.
Hence, what was returned was always (65539 * num)
On Mon, Aug 14, 2017 at 12:49 PM, Martin Møller Skarbiniks Pedersen
wrote:
> Dear all,
>
> I
Dear all,
I am trying to learn functions in R and 3D plotting so I decided to try
to plot
the famous bad PRNG Randu from IBM(1).
However something is not correct in the function I have created.
First I define the function RANDU like this:
> RANDU <- function(num) { return (65539*num)%%(2
5 matches
Mail list logo