Description Usage Arguments Value Difference with plain runif Seeding Octave details Octave Documentation for rand See Also Examples

This function wraps a call to the standard Octave function `rand`

,
which is redefined by `RcppOctave`

to call the R base function
`runif`

.
This enables to exactly reproduce stochastic computations in R and Octave,
without changing the original Octave/Matlab code.

1 | ```
o_runif(n, p = n)
``` |

`n` |
number of output rows |

`p` |
number of output columns (default to |

a numeric vector or a matrix

`runif`

Since calling `o_runif`

or `runif`

is equivalent, this
function may not be really useful for the end user, and is defined for
testing purposes essentially.
One possible advantage over plain `runif`

however, is that it
can generate random matrices, instead of only vectors (see examples).

Because the RNG of R is called used, seeding computations is achieved by a
standard call to `set.seed`

.

`RcppOctave`

defines a set of functions like `rand`

that shadow
Octave built-in functions.
These functions are defined in the Octave module `Rrng.oct`

that is
stored in the package *modules/* sub-directory.
See `Octave.info('modules')`

to see this directory's full path.

*[Generated from Octave-\Sexpr{RcppOctave::o_version()} on \Sexpr{Sys.time()}]*

runif

Other orandom: `o_rexp`

;
`o_rgamma`

; `o_rnorm`

;
`o_rpois`

1 2 3 4 5 6 7 8 9 10 11 12 13 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.