random_normal_factory: Make Normal Sampling Functions

Description Usage Arguments Value Author(s) Examples

View source: R/random_normal_factory.R

Description

Makes a function that samples from a normal distribution.

Usage

1

Arguments

mean

mean of normal distribution from which to sample

sd

standard deviation of the normal distribution

Value

a function of a single parameter n, with default value 1.

Author(s)

Homer White hwhite0@georgetowncollege.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
sampler <- random_normal_factory(mean = 70, sd = 5)
## sample one
sampler()
## sample another
sampler()
## sample a third time
sampler()
## sample another 1000
sampler(n = 1000)

## End(Not run)

homerhanumat/tigerstats documentation built on Sept. 27, 2020, 3:21 a.m.