One comment on “Prime testing function in R

  1. Cool! I used this instead of gmp to make a primorial function.

    primorial <- function(n) if(n==1) return(1) else │ + if(isprime(n)) return(n*primorial(n-1)) else return(primorial(n-1))

Leave a Reply

Your email address will not be published. Required fields are marked *


eight − two =

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>