#' Multiple Logic
#'
#' Logical response to whether x is an even multiple of y.
#' @param x Numeric, single.
#' @param y Numeric, single
#' @export
#' @return T/F
multipleof <- function(x, y){
if (!is.numeric(x)) stop("'x' must be numeric.")
if (length(x) != 1) stop("'x' must be of length == 1.")
x1 <- x[x %% y == 0]
if (length(x1) == 1){
return(T)
}else{
return(F)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.