gcd | R Documentation |
Greatest common divisor or factor for all elements of a positive-integer-valued vector.
gcd(x)
x |
a numeric vector consisting of at least two positive integer values. |
The gcd is calculated using the Euclidean algorithm applied to successive pairs of the elements of x.
a numeric constant containing the greatest common divisor.
x <- c(81, 57, 333)
gcd(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.