Re: [R] hashmap in R

From: Earl F. Glynn <efg_at_stowers-institute.org>
Date: Thu, 08 May 2008 09:40:04 -0500

"Qiang Li (Jonathan)" <jonathanli_1999_at_yahoo.com> wrote in message news:<328180.44275.qm@web50805.mail.re2.yahoo.com>...
> Hi friends on R list,
>
> Have people tried to implement a hashmap in R? What is the generic way to
> implement a lookup table in R?

Does this help?

> x <- rnorm(4)
> names(x) <- c("a", "b", "c", "d")
> x

         a b c d -1.4122868 1.3588267 -0.5499391 -0.3581889
> x["d"]

         d
-0.3581889

efg
Earl F Glynn
Bioinformatics
Stowers Institute for Medical Research



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 08 May 2008 - 15:00:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 08 May 2008 - 15:30:36 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive