| Start |
|---|
| Environments as hash maps Note: in the subsequent passages, the terms hash map and hash table are used interchangeably and refer to the same concept (opens new window), namely, a data structure providing efficient key lookup through use of an internal hash function. IntroductionAlthough R does not provide a native hash table structure, similar functionality can be achieved by leveraging the fact that the Additionally, one may specify that the internal hash table is pre-allocated with a particular size via the InsertionInsertion of elements may be done using either of the Like other facets of R, the first method ( As is generally the case with hash map implementations, the Key LookupLikewise, elements may be accessed with Inspecting the Hash MapBeing just an ordinary Elements can be removed using FlexibilityOne of the major benefits of using LimitationsOne of the major limitations of using Depending on the nature of the data being stored in the object, it may be possible to use Neither of the above are particularly concise, but may be preferable to using a |
| package:hash The hash package (opens new window) offers a hash structure in R. However, it terms of timing (opens new window) for both inserts and reads it compares unfavorably to using environments as a hash. This documentation simply acknowledges its existence and provides sample timing code below for the above stated reasons. There is no identified case where hash is an appropriate solution in R code today. Consider: |
| package:listenv Although |
Read Article
https://develop.horje.com/learn/1434/reference