doc <- am_create()
am_put(doc, AM_ROOT, "x", 1)
am_commit(doc, "First")
am_put(doc, AM_ROOT, "y", 2)
am_commit(doc, "Second")
history <- am_get_changes(doc)
am_change_seq(history[[1]]) # 1
am_change_seq(history[[2]]) # 2
am_close(doc)
Run the code above in your browser using DataLab