Learn R Programming

RcppOctave (version 0.18.1)

o_rnorm: Drawing from R Normal Distribution in Octave

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

o_rnorm(n, p = n)

Arguments

n
number of output rows
p
number of output columns (default to n)

Octave Documentation for <em>randn</em>

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

[Generated from Octave-RcppOctave::o_version() on Sys.time()]

# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE)

# 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)

rnorm

Other orandom: o_rexp; o_rgamma; o_rpois; o_runif