Learn R Programming

automerge (version 0.3.1)

length.am_doc: Get length of document root

Description

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

Usage

# S3 method for am_doc
length(x)

Value

Integer length

Arguments

x

An Automerge document

Examples

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

Run the code above in your browser using DataLab