#' This is a function that uses the euclidean algorithm
#' @param a is numeric or integer
#' @param b is numeric or integer
#' @export
euclidian_A <- function(a, b) {
if(!is.numeric(a) | !is.numeric(b)){
stop("Not a numeric input")
} else {
if(b > a){
temp_a <-a
temp_b <- b
a <- temp_b
b <- temp_a
}
r_1 <- a;
r_2 <- b;
while(r_2 != 0) {
r <- r_1 %% r_2
r_1 <- r_2
r_2 <- r
}
return(r_1)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.