Checking inputs allows code to ‘fail early’ with clear error messages, rather tha failing cryptically later.
a scalar (length 1) numeric vector to be compared to a random number.
Update the code below to check that the variable used in the
if is scalar, to avoid a mysterious message “the
condition has length > 1 and only the first element will be
stopifnot() as a convenient way to test the pre-
Find examples on the Bioconductor support site where this error has confused users.
A scalar numeric vector. If the input is greater than a random normal deviate, the return value is the random normal deviate. Otherwise, the return value is the orignal input.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.