MyCalc <- function(x, y){
assert_that(is_scalar_integer(x),
msg = "Argument 'x' must be in integer scalar format")
# Test the Value
if (x %% 2) {
val <- x + y
} else {
val <- x * y
}
# Return Value
return(val)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.