extract-am_doc: Extract from Automerge document root

extract-am_docR Documentation

Extract from Automerge document root

Description

Extract values from the root of an Automerge document using [[ or $. These operators provide R-idiomatic access to document data.

Usage

## S3 method for class 'am_doc'
x[[i]]

## S3 method for class 'am_doc'
x$name

Arguments

x

An Automerge document

i

Key name (character)

name

Key name (for $ operator)

Value

The value at the specified key

Examples

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)


automerge documentation built on Feb. 5, 2026, 5:08 p.m.