Description Usage Arguments Details Value See Also Examples
load_hashmap
reads a file created by a call to
save_hashmap
and returns a Hashmap
object.
1 |
file |
the name of a file previously created by a call to
|
The object returned will contain all of the same key-value
pairs that were present in the original Hashmap
at the time
save_hashmap
was called, but they are not guaranteed to be
in the same order, due to rehashing.
A Hashmap
object on success; an error on failure.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | H <- hashmap(sample(letters[1:10]), sample(1:10))
tf <- tempfile()
save_hashmap(H, tf)
H2 <- load_hashmap(tf)
all.equal(
sort(H$find(H2$keys())),
sort(H2$values())
)
all.equal(
H$data.frame(),
readRDS(tf)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.