copy: Create a seperate copy of a hash object.

Description Value Methods Author(s) See Also Examples


The copy hash method creates a independent copy of a hash object. Creating a copy using the assingment operator, <-, does not work as expected, since hashes are based on environments and environments are reference objects in R. The assignment operator consequently creates a linked copy to the original hash and not an independent copy. The copy method provides an identical unlinked copy of the hash.


A hash object.


signature(x = "hash")

Creates and returns an identical, independent, unreferenced copy of the the hash.


Christopher Brown

See Also



  h <- hash( a=1, b=2 ) <- copy( h )

hash documentation built on May 19, 2017, 9:58 a.m.
Search within the hash package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.