[R] Fast lookup in ragged array

Seth Falcon sfalcon at fhcrc.org
Fri Mar 16 20:02:33 CET 2007


Peter McMahan <peter.mcmahan at gmail.com> writes:

> Thanks, I'll give it a try. does R have a limit on variable name
> length?

If you are going to have very long names, you might be better off
computing a digest of some kind.  You could use the digest package to
compute an md5sum or the Ruuid package to generate a GUID.

> Also, is it better to over-estimate or under-estimate the
> size parameter?

The environment will grow as needed.  If you overestimate, you will
use more memory than you need to.  Whether this is a problem depends
if you have extra memory available.  Underestimating means that the
underlying hashtable will need to be resized and this has a
performance impact.

+ seth

-- 
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org



More information about the R-help mailing list