#'@title Euclidean
#'
#'@description Euclidean algorithm finds highest common factor of two natural numbers.
#'
#'@param a natural_number
#'@param b natural_number
#'
#'@return Factor variable
#'
#'@examples
#'euclidean(123612, 13892347912)
#'euclidean(100, 1000)
#'
#'@references https://en.wikipedia.org/wiki/Euclidean_algorithm
#'@export
euclidean <-
function(a,b){
while(b!=0)
{
stopifnot(is.numeric(a)&is.numeric(b))
t<-b
b<-a%%b
a<-t
}
return(a)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.