| am_load | R Documentation |
Deserializes an Automerge document from the standard binary format. The binary format is compatible across all Automerge implementations (JavaScript, Rust, etc.).
am_load(data)
data |
A raw vector containing a serialized Automerge document |
An external pointer to the Automerge document with class
c("am_doc", "automerge").
# Create, save, and reload
doc1 <- am_create()
bytes <- am_save(doc1)
doc2 <- am_load(bytes)
# Save to and load from file
doc3 <- am_create()
file <- tempfile()
writeBin(am_save(doc3), file)
doc4 <- am_load(readBin(file, "raw", 1e5))
unlink(file)
am_close(doc1)
am_close(doc2)
am_close(doc3)
am_close(doc4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.