prime_factors | R Documentation |
Compute the prime factors of elements of an integer vector.
prime_factors(x)
x |
an integer vector. |
A list of integer vectors reflecting the prime factorizations of each element of the input vector.
Paul Egeler, MS
prime_factors(c(1, 5:7, 99))
## [[1]]
## integer(0)
##
## [[2]]
## [1] 5
##
## [[3]]
## [1] 2 3
##
## [[4]]
## [1] 7
##
## [[5]]
## [1] 3 3 11
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.