Learn R Programming

minMSE (version 0.5.1)

vector_gcd: Vector Greatest Common Divisor

Description

Computes the GCD of a vector.

Usage

vector_gcd(vec)

Arguments

vec

a vector, for which we want to compute the GCD.

Value

The GCD of the elements in the given vector.

Examples

Run this code
# NOT RUN {
input = c(3,6,9)
vector_gcd(input)
# }

Run the code above in your browser using DataLab