doc <- am_create()
am_put(doc, AM_ROOT, "key", "value")
am_commit(doc, "Add key")
history <- am_get_changes(doc)
actor <- am_change_actor_id(history[[1]])
actor
# Should match the document's actor
identical(actor, am_get_actor(doc)) # TRUE
am_close(doc)
Run the code above in your browser using DataLab