Learn R Programming

nanonext (version 0.5.4)

random: NNG Random Number Generator

Description

Strictly not for statistical analysis. Not reproducible. No ability to set a seed value. Provides random numbers suitable for system functions such as cryptographic key generation. Random values are obtained using platform-specific strong cryptographic random number facilities where available.

Usage

random(n = 1L)

Value

A length 'n' vector of random positive doubles.

Arguments

n

[default 1L] length of vector to return.

Details

If 'n' is non-integer, it will be coerced to integer; if a vector, only the first element will be used.

Examples

Run this code
random()
random(n = 3L)

Run the code above in your browser using DataLab