Learn R Programming

fracture (version 0.2.2)

frac_lcm: Least common multiple and greatest common divisor

Description

Least common multiple and greatest common divisor

Usage

frac_lcm(..., max = 1e+07)

frac_gcd(...)

Value

An integer.

Arguments

...

Integer vectors or vectors that can be coerced to integer.

max

If the least common multiple is greater than max, max is returned instead.

Examples

Run this code
frac_lcm(1, 2, 3, 4, 5, 6)
x <- 1:6
frac_lcm(x)
frac_lcm(x, 7)

frac_gcd(12, 42, 60)
y <- c(12, 42, 60)
frac_gcd(y)
frac_gcd(y, 39)

Run the code above in your browser using DataLab