Description Usage Arguments Details See Also Examples
This is a very basic implementation of a hash table using the digest
package,
primarily for teaching functions and S3 for R programmers.
1 2 3 4 5 6 7 8 9 | ht()
## S3 method for class 'ht'
x[index]
## S3 replacement method for class 'ht'
x[index] <- value
index %in.ht% x
|
x |
an |
index |
A key object |
value |
A value object |
ht
is an S3 class that extends environment
, and additionally provides [
and [<-
.
It can use arbitrary R objects as keys and values.
Currently, default options are assummed for digest
and hash collisions are not dealt with at all.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.