common_factors: Common Factors of Multiple Numbers

Description Usage Arguments Value Examples

View source: R/factors.R

Description

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.

Usage

1
common_factors(..., greatest = FALSE)

Arguments

...

The numbers that you want to get the common factors of.

greatest

Logical. Should the result be only the greatest common factor? Defaults to FALSE.

Value

A numeric vector.

Examples

1
2
common_factors(18, 48)
common_factors(25, 50, 100, greatest = TRUE)

mrdwab/mathrrr documentation built on July 20, 2020, 11:14 p.m.