o_rnorm: Drawing from R Normal Distribution in Octave

Description Usage Arguments Octave Documentation for randn See Also Examples

View source: R/random.R

Description

This function wraps a call to the standard Octave function randn, which is redefined by RcppOctave to call the R base function rnorm. This enables to exactly reproduce stochastic computations in R and Octave, without changing the original Octave/Matlab code. See o_runif for more details.

Usage

1
o_rnorm(n, p = n)

Arguments

n

number of output rows

p

number of output columns (default to n)

Octave Documentation for randn

\Sexpr[results=rd,stage=render]{if( .Platform$OS.type != 'windows' || .Platform$r_arch != 'x64' ) RcppOctave::o_help(randn, format='rd')}

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

See Also

rnorm

Other orandom: o_rexp; o_rgamma; o_rpois; o_runif

Examples

1
2
3
4
5
6
7
8
9
# Draw random normal values (in vector form)
set.seed(123)
o_rnorm(1)
o_rnorm(1, 10)

# Draw random normal values (in matrix form)
set.seed(123)
o_rnorm(2)
o_rnorm(2, 5)

RcppOctave documentation built on May 29, 2017, 11:31 a.m.