This function slightly generalizes the basic `rnorm`

function,
allowing truncation with `trunc`

.

The number of returned
draws is `max(length(mu),length(coefvar))`

. When both lengths
are not equal, the smaller one must be equal to one, if not an error
is issued.

`NA`

value are possible in `mu`

and
`coefvar`

, then missing values are returned for the considered
draws.

1 |

`mu` |
numeric vector of the expectation of the normal. |

`coefvar` |
numeric vector of the coefficient of variation. Cannot be negative. |

`trunc` |
The two limits to which distribution is truncated. The truncation interval is common for all draws. |

To comply with /prr/ point of view, the second parameter of the
normal distribution is given through the variation coefficient. The
relation with more standard sigma is given by

sigma =
(coefvar/100)*abs(mu) and

coefvar = (100*sigma) / abs(mu). Notice
that as the standard deviation is given through the variation
coefficient, expectation values too close to zero can be problematic.
This is why, such values are discarded and replaced by `NA`

. A
local constant is used for the test.

A vector of the drawn values, possibly containing `NA`

.

1 2 3 4 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.