From ggrothendieck at gmail.com  Sun Jul 22 02:43:37 2007
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Sat, 21 Jul 2007 20:43:37 -0400
Subject: [Rd] dict package: dictionary data structure for R
In-Reply-To: <m28x99lbd0.fsf@ziti.fhcrc.org>
References: <m28x99lbd0.fsf@ziti.fhcrc.org>
Message-ID: <971536df0707211743t117cf29cx9b745f3f9d6a0dfd@mail.gmail.com>

Although the proto package is not particularly aimed at hashing note
that it covers some of the same ground and also is based on a well
thought out object model (known as object-based programming
or prototype programming).

Here is an example where we create two proto objects (which could
be regarded as hash tables) in which q is a child of p and so inherits a:

   library(proto)
   p <- proto(a = 1, b = 2)
   q <- p$proto(c = 3)
   q$a # 1



On 7/21/07, Seth Falcon <sfalcon at fhcrc.org> wrote:
> Hi all,
>
> The dict package provides a dictionary (hashtable) data
> structure much like R's built-in environment objects, but with the
> following differences:
>
>  - The Dict class can be subclassed.
>
>  - Four different hashing functions are implemented and the user can
>    specify which to use when creating an instance.
>
> I'm sending this here as opposed to R-packages because this package
> will only be of interest to developers and because I'd like to get
> feedback from a slightly smaller community before either putting it on
> CRAN or retiring it to /dev/null.
>
> The design makes it fairly easy to add additional hashing functions,
> although currently this must be done in C.  If nothing else, this
> package should be useful for evaluating hashing functions (see the
> vignette for some examples).
>
> Source:
>  R-2.6.x: http://userprimary.net/software/dict_0.1.0.tar.gz
>  R-2.5.x: http://userprimary.net/software/dict_0.0.4.tar.gz
>
> Windows binary:
>  R-2.5.x: http://userprimary.net/software/dict_0.0.4.zip
>
>
> + seth
>
> --
> Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
> http://bioconductor.org
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] dict package: dictionary data structure for R
Gabor Grothendieck