[R] hash code for arbitrary object

Roger D. Peng rpeng at jhsph.edu
Wed Aug 3 13:52:27 CEST 2005


You can compute MD5 and SHA1 digests with the 'digest' package.

-roger

Adrian Baddeley wrote:
> Can anyone suggest a simple way to calculate a 'hash code'
> from an arbitrary R object?
> 
> hash(x) should return an integer or string 
> with the property that 
>      if hash(x) != hash(y) then x and y are not identical
> and the time to compute hash(x) should be quite short.
> 
> Any suggestions welcome
> thanks
> Adrian Baddeley
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 

-- 
Roger D. Peng
http://www.biostat.jhsph.edu/~rpeng/




More information about the R-help mailing list