Learn R Programming

automerge (version 0.3.0)

am_values: Get all values from a map or list

Description

Returns all values from an Automerge map or list as an R list.

Usage

am_values(doc, obj)

Value

R list of values

Arguments

doc

An Automerge document

obj

An Automerge object ID, or AM_ROOT for the document root

Examples

Run this code
doc <- am_create()
am_put(doc, AM_ROOT, "a", 1)
am_put(doc, AM_ROOT, "b", 2)
am_put(doc, AM_ROOT, "c", 3)

values <- am_values(doc, AM_ROOT)
values  # list(1, 2, 3)

am_close(doc)

Run the code above in your browser using DataLab