Returns a vector with ages with a normal distribution truncated by upper and upper limits.
Arguments
- n
An integer to define the length of the returned vector.
- lower
An integer for ages' lower limit.
- upper
An integer for ages' upper limit.
- mean
A value for mean's distribution.
- sd
A value for standar deviation's distribution.
- seed.number
Seed for pseudo random number generator.
Examples
ages(n = 100, lower=18, upper=75, mean = 55, sd = 15, seed.number = 123)
#> [1] 47 52 56 57 62 36 45 48 73 60 61 57 47 62 26 66 48 39 52 40 44 46 30 68 57
#> [26] 38 74 61 51 68 68 67 65 63 54 50 49 45 52 36 73 38 49 48 67 54 59 55 54 52
#> [51] 32 64 57 58 61 47 50 40 39 60 62 56 69 48 20 70 44 45 70 51 37 58 53 55 61
#> [76] 49 65 52 60 71 62 50 72 70 63 59 46 46 51 40 44 59 51 50 41 54 43 30 49 69