#' Compute squares
#'
#' @param x numeric to compute the square of
#'
#' @return square of x
#' @export
#'
#' @author Pedro Neves
#'
#' @examples compute_square(2)
compute_square <- function(x) {
if (!is.numeric(x)) {
stop("Error: x must be numeric")
}
out <- x * x
out
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.