On Tue, Oct 13, 2009 at 5:30 PM, Barry Rowlingson
wrote:
> On Tue, Oct 13, 2009 at 2:41 PM, Thomas Lumley
> wrote:
>> On Tue, 13 Oct 2009, AJ83 wrote:
>>
>>>
>>> I need to create a function to find all the prime numbers in an array. Can
>>> anyone point me in the right direction?
>
> This almos
On Tue, Oct 13, 2009 at 2:41 PM, Thomas Lumley wrote:
> On Tue, 13 Oct 2009, AJ83 wrote:
>
>>
>> I need to create a function to find all the prime numbers in an array. Can
>> anyone point me in the right direction?
This almost sounds like a homework problem to me... So here's a
solution that you
On Tue, 13 Oct 2009, AJ83 wrote:
I need to create a function to find all the prime numbers in an array. Can
anyone point me in the right direction?
It depends a bit on how big the numbers are. If the array is large but the numbers are not very large the
fastest approach is probably to creat
I need to create a function to find all the prime numbers in an array. Can
anyone point me in the right direction?
Thank you.
AJ
--
View this message in context:
http://www.nabble.com/Function-to-find-prime-numbers-tp25868633p25868633.html
Sent from the R help mailing list archive at Nabble.com
library(gmp)
?isprime
/Gustaf
On Tue, Oct 13, 2009 at 9:59 AM, AJ83 wrote:
>
> I need to create a function to find all the prime numbers in an array. Can
> anyone point me in the right direction?
> Thank you.
> AJ
> --
> View this message in context:
> http://www.nabble.com/Function-to-find-
On 10/13/2009 09:59 AM, AJ83 wrote:
I need to create a function to find all the prime numbers in an array. Can
anyone point me in the right direction?
Thank you.
AJ
There is isprime in package gmp.
> data.frame( number = 1:10, is.prime = isprime( 1:10 ) > 1,
is.probably.prime = isprime(1:10
6 matches
Mail list logo