[R] a problem of approach

Adrian Duşa dusa.adrian at gmail.com
Sun Feb 10 11:39:06 CET 2013

Dear Petr,

On Wed, Jun 27, 2012 11:02:39 am, Petr Savicky wrote:
> How large the numbers are? If the bound 3^14 = 4782969 used above apply also to the real situation,
> then it is possible to represent the set using a logical vector of this length, which has TRUE for the numbers
> present in the set and FALSE for the other. Removing a number means to set its bit from TRUE to FALSE,
> which is a very simple operation.

Apologies for my rather late answer, I have my email set as digest
mode, so if you replied to the list only I didn't see it immediately.

Thanks for this, I did something in the line you mentioned, but in C.
The final approach was to use linked lists, which made it no longer
necessary to progressively shorten the vector, and the C algorithm is
now literally hundreds of times faster for very large vectors.

Best wishes,

More information about the R-help mailing list