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.
Examples
ages(n = 100, lower=18, upper=75, mean = 55, sd = 15)
#> [1] 41 51 59 38 58 55 56 72 37 74 44 38 44 59 57 50 41 45 73 58 46 41 52 30 48
#> [26] 44 72 70 54 38 69 68 66 66 50 66 75 56 40 67 67 50 43 60 21 53 72 48 42 66
#> [51] 43 59 29 34 48 39 69 43 64 69 59 60 73 48 49 69 36 58 55 62 70 59 58 66 73
#> [76] 61 40 53 50 65 73 67 55 58 42 62 42 42 40 45 71 49 54 48 63 69 52 64 49 71