| am_get_heads | R Documentation |
Returns the current "heads" of the document - the hashes of the most recent changes. These identify the current state of the document and can be used for history operations.
am_get_heads(doc)
doc |
An Automerge document |
A list of raw vectors, each containing a change hash. Usually there is only one head, but after concurrent edits there may be multiple heads until they are merged by a subsequent commit.
doc <- am_create()
am_put(doc, AM_ROOT, "x", 1)
am_commit(doc)
heads <- am_get_heads(doc)
cat("Document has", length(heads), "head(s)\n")
am_close(doc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.