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? Best, Jonathan ==============Jonathan Qiang Li ============== ____________________________________________________________________________________ [[elided Yahoo spam]] [[alternative HTML version deleted]]
Qiang Li (Jonathan <jonathanli_1999 <at> yahoo.com> writes:> Have people tried to implement a hashmap in R? What is the generic way toimplement a lookup table in R? By default, this is implicit, for example, when using named vectors. http://finzi.psych.upenn.edu/R/Rhelp02a/archive/51507.html and ?environment Dieter
"Qiang Li (Jonathan)" <jonathanli_1999 at yahoo.com> wrote in message news:<328180.44275.qm at 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") > xa 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