set.seed(19790801) library(assertive) knitr::opts_chunk$set(error = FALSE)
The answer is a little subjective.
x, I suggest simply enforcing that it is
constant are expected to be single numbers. You can either throw
an error if this is not the case using
assert_is_a_number(center), etc., or
have a slightly more forgiving check for numeric followed by retrieving of the
first value using
center <- use_first(center), etc.. For very strict
checking, you may also wish to ensure that
constant are not
missing or NaN using
high are expected to be logical values. You can throw an
error for inputs that don't conform using
assert_is_a_bool(na.rm), etc.. I
suggest being more forgiving by extracting the first element and coercing to
na.rm <- coerce_to(use_first(na.rm), "logical"), etc.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.