View source: R/random_generators.R
Random values simulation | R Documentation |
Functions to simulate random values from different probability distributions: uniform, beta, exponential, chi-squared, gamma, Cauchy, t-distribution, and geometric.
Runif(n, min = 0, max = 1)
n |
The number of values to generate. |
min |
For |
max |
For |
Runif
: generates random values from the uniform distribution, similar to R's built-in runif
function. The type used is min + (max - min) \cdot U
, where U
is a uniform random variable in the interval (0, 1).
Each function returns a vector with simulated values from the respective distribution.
Manos Papadakis.
R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.
runif
x_unif <- Runif(1000, 0, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.