| extract-am_doc | R Documentation |
Extract values from the root of an Automerge document using [[ or $.
These operators provide R-idiomatic access to document data.
## S3 method for class 'am_doc'
x[[i]]
## S3 method for class 'am_doc'
x$name
x |
An Automerge document |
i |
Key name (character) |
name |
Key name (for |
The value at the specified key
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.