| am_commit | R Documentation |
Commits all pending operations in the current transaction, creating a new change in the document's history. Commits can include an optional message (like a git commit message) and timestamp.
am_commit(doc, message = NULL, time = NULL)
doc |
An Automerge document |
message |
Optional commit message (character string) |
time |
Optional timestamp (POSIXct). If |
The document doc (invisibly)
doc <- am_create()
am_put(doc, AM_ROOT, "key", "value")
am_commit(doc, "Add initial data")
# Commit with specific timestamp
am_commit(doc, "Update", Sys.time())
am_close(doc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.