The common_factors
function takes a set of numbers and identifies
the common factors between them. It can also be used to identify the
greatest common factor of a set of numbers.
common_factors(..., greatest = FALSE)
... | The numbers that you want to get the common factors of. |
---|---|
greatest | Logical. Should the result be only the greatest
common factor? Defaults to |
A numeric vector.
common_factors(18, 48)#> [1] 1 2 3 6common_factors(25, 50, 100, greatest = TRUE)#> [1] 25