Learn R Programming

foieGras (version 0.7-6)

rtnorm: rtnorm

Description

rtnorm

Usage

rtnorm(n, mean = 0, sd = 1, l = -Inf, u = Inf)

Arguments

n

number of random values to generate

mean

vector of means

sd

vector of standard deviations

l

lower limit of distribution

u

upper limit of distribution

Details

simulate values from a truncated normal distribution

Examples

Run this code
# NOT RUN {
x <- rtnorm(10, l = -5, u = 5)
range(x)
# }

Run the code above in your browser using DataLab