{"id":14068878,"url":"https://github.com/decisionpatterns/r-hash","last_synced_at":"2026-03-13T18:34:47.894Z","repository":{"id":12234054,"uuid":"14844957","full_name":"decisionpatterns/r-hash","owner":"decisionpatterns","description":"Full feature implementation of hash/associated arrays/dictionaries in R","archived":false,"fork":false,"pushed_at":"2019-02-05T16:10:00.000Z","size":152,"stargazers_count":29,"open_issues_count":6,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-13T07:15:26.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decisionpatterns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-01T19:43:54.000Z","updated_at":"2024-06-19T21:04:22.000Z","dependencies_parsed_at":"2022-09-07T11:21:35.624Z","dependency_job_id":null,"html_url":"https://github.com/decisionpatterns/r-hash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decisionpatterns%2Fr-hash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decisionpatterns%2Fr-hash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decisionpatterns%2Fr-hash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decisionpatterns%2Fr-hash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decisionpatterns","download_url":"https://codeload.github.com/decisionpatterns/r-hash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228082393,"owners_count":17866611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:06:27.624Z","updated_at":"2025-12-22T20:02:34.578Z","avatar_url":"https://github.com/decisionpatterns.png","language":"R","readme":"# hash \n\n## hash/dictionary/maps in R\n\n![](https://img.shields.io/cran/v/hash.svg) \u003c!-- Version --\u003e \n![](https://img.shields.io/cran/l/hash.svg) \u003c!-- License --\u003e \n[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)\n[![Downloads](https://cranlogs.r-pkg.org/badges/hash?color=brightgreen)](https://www.r-pkg.org/pkg/hash)\n[![](http://cranlogs.r-pkg.org/badges/grand-total/hash)](https://cran.r-project.org/package=hash)\n\u003c!-- [![Research software impact](http://depsy.org/api/package/cran/searchable/badge.svg)](http://depsy.org/package/r/searchable) --\u003e\n\nThe *hash* package provides a fully-functional hash/dictionaryfor the R language. It provides richer features and finer control of hash behavior than using native R structures like list or environments and has as a user-friendly interface. Performance-wise it has similar and sometimes better performance than these structures especially for larger objects.\n\n\n## Installation\n\nLatest Release:\n\n    install.packages('hash')\n\n\nDevelopment Version:\n\n    install.packages('devtools')\n    devtools::install_github('decisionpatterns/r-hash')\n\n\n## Examples \n\n    # Create a hash \n    h \u003c- hash(a=1, b=2, c=3)\n    h \u003c- hash( letters[1:3], 1:3 )\n    h \u003c- hash( list(a=1,b=2,c=3) )  \n     \n    # Keys \n    keys(h)\n     \n    # Values (named list)\n    values(h)\n     \n    # Assign to single key hash\n    h$a \u003c- \"foo\"\n    h[['a']] \u003c- \"bar\"\n     \n    # Slice\n    h[ c('a','c') ]\n    \n\n## Allowable Values  \n\n\n**KEYS** must be a valid character value and may not be the empty string (\"\"). Keys must be unique.\n\n**VALUES** can be any R value, vector, object, etc. \n\n\n## Usage Notes\n\nHashes probably work about how you would expect, but since there are built from R's native environments. There are three things to Remember:\n\n**PASS-BY REFERENCE**. hashes are environments, special objects in R where only one copy exists globally. When passed as an argument to a function, no local copy is made and any changes to the hash in the functions are reflected globally, i.e. in the caller's namespace.\n\n**PERFORMANCE**.  Hashes are designed to be exceedingly fast using R environment's internal hash table.  The hash function is not without its cost. For small data structures, a named lists and vectors will out-perform a hash in nearly every case. After approximately 500+ elements, the performance of the hash becomes faster than native lists and vectors.  \n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecisionpatterns%2Fr-hash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecisionpatterns%2Fr-hash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecisionpatterns%2Fr-hash/lists"}