Learn R Programming

automerge (version 0.3.0)

str.am_doc: Display the structure of an Automerge document

Description

S3 method for utils::str() that displays the structure of an Automerge document in a human-readable format.

Usage

# S3 method for am_doc
str(object, max.level = 2, ...)

Value

Invisibly returns NULL.

Arguments

object

An automerge document object.

max.level

Maximum depth to recurse into nested structures. Default 2.

...

Additional arguments (ignored).

Examples

Run this code
doc <- am_create()
doc$name <- "Alice"
doc$data <- list(x = 1L, y = 2L)
str(doc)
str(doc, max.level = 1)
am_close(doc)

Run the code above in your browser using DataLab