powered by
Extract values from the root of an Automerge document using [[ or $. These operators provide R-idiomatic access to document data.
[[
$
# S3 method for am_doc [[(x, i)# S3 method for am_doc $(x, name)
# S3 method for am_doc $(x, name)
The value at the specified key
An Automerge document
Key name (character)
Key name (for $ operator)
doc <- am_create() am_put(doc, AM_ROOT, "name", "Alice") am_put(doc, AM_ROOT, "age", 30L) doc[["name"]] # "Alice" doc$age # 30L am_close(doc)
Run the code above in your browser using DataLab