Nothing
#' Discrete range
#'
#' Checks if a variable is within a discrete range.
#' @param variable variable.
#' @param range Allowed range.
#' @param message Message to be printed in case of failure.
#' @return No return value, only performs a check.
#' @export
add_range <- function(variable, range, message){
if(is.null(variable) || !length(variable) || !all(variable %in% range)){
stop(paste("'",variable,"' argument must be one of:", message))
}
}
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.