gcd | R Documentation |
gcd()
takes a vector of whole numbers and returns their greatest common divisor as a numeric vector of length 1.
gcd(v)
v |
A vector of whole numbers |
gcd()
takes a vector, v, of whole numbers as argument and returns their greatest common
divisor. Throws an error if any number in v is not a whole number (to within .Machine$double.eps^0.5
).
Returns a numeric value corresponding to the greatest common divisor of the numbers in v.
gcd(c(48, 96, 144))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.