
6 BASIC DATA ANALYSIS
References
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language.
Wadsworth & Brooks/Cole.
See Also
.Random.seed about random number generation, rnorm, etc for other distributions.
Examples
u <- runif(20)
## The following relations always hold :
punif(u) == u
dunif(u) == 1
var(runif(10000))#- ~ = 1/12 = .08333
The help information tells us that as an argument for runif() we have to supply the
number n of random variates to generate. As additional arguments for runif() we can
specify the minimum and the maximum for the range of the random numbers. If we do
not specify additional arguments, the default values min =