Description Usage Arguments Value Note Examples
The prime_factors
function is used to calculate the prime factors of
a positive integer greater than 1.
1 | prime_factors(x, unique = TRUE)
|
x |
The number that you want the prime factors of. |
unique |
Logical. Should the function return all prime factors
(where |
A numeric vector either with the repeated prime factorization of the input or just the unique prime factors of the input.
Returns NULL
for a value of 1, and generates an error for
values less than 1.
1 2 | prime_factors(100, unique = FALSE)
prime_factors(100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.