Learn R Programming

automerge (version 0.4.0)

am_counter: Create an Automerge counter

Description

Creates a counter value for use with Automerge. Counters are CRDT types that support conflict-free increment and decrement operations.

Usage

am_counter(value = 0L)

Value

An am_counter object

Arguments

value

Initial counter value (default 0)

Examples

Run this code
doc <- am_create()
am_put(doc, AM_ROOT, "score", am_counter(0))
am_close(doc)

Run the code above in your browser using DataLab