Learn R Programming

hmi (version 0.9.16)

factors: Function to get all factors

Description

Function to get all factors (not limited to prime factors) of an integer.

Usage

factors(x)

Arguments

x

A single integer; no vector.

Value

A numeric vector with the factors

References

based on stackoverflow.com/questions/6424856 "R Function for returning ALL factors" answer by Chase