[Rd] dict package: dictionary data structure for R

Gabor Grothendieck ggrothendieck at gmail.com
Sun Jul 22 02:43:37 CEST 2007


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
>



More information about the R-devel mailing list