| am_merge | R Documentation |
Merges all changes from another Automerge document into this one.
This is a one-way merge: changes flow from other into doc,
but other is not modified. For bidirectional synchronization,
use am_sync().
am_merge(doc, other)
doc |
Target document (will receive changes) |
other |
Source document (provides changes) |
The target document doc (invisibly)
doc1 <- am_create()
doc2 <- am_create()
# Make changes in each document
am_put(doc1, AM_ROOT, "x", 1)
am_put(doc2, AM_ROOT, "y", 2)
# Merge doc2's changes into doc1
am_merge(doc1, doc2)
# Now doc1 has both x and y
am_close(doc1)
am_close(doc2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.