length.am_doc: Get length of document root

View source: R/methods.R

length.am_docR Documentation

Get length of document root

Description

Returns the number of keys in the root map of an Automerge document.

Usage

## S3 method for class 'am_doc'
length(x)

Arguments

x

An Automerge document

Value

Integer length

Examples

doc <- am_create()
doc$a <- 1
doc$b <- 2
length(doc)  # 2
am_close(doc)


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