Factors of an integer: Difference between revisions
Undo revision 306600 by ReeceGoding (talk)
ReeceGoding (talk | contribs) |
ReeceGoding (talk | contribs) (Undo revision 306600 by ReeceGoding (talk)) |
||
Line 4,470:
===Filter solution===
With identical output, a more idiomatic way is to use R's Filter and Vectorize:
<lang R>factors<-function(n){
#If you want to use a vector of integers as an input, as in the previous solution, use:
|