Learn R Programming

automerge (version 0.3.0)

am_delete: Delete a key from a map or element from a list

Description

Removes a key-value pair from a map or an element from a list.

Usage

am_delete(doc, obj, key)

Value

The document doc (invisibly)

Arguments

doc

An Automerge document

obj

An Automerge object ID (from nested object), or AM_ROOT for the document root

key

For maps: character string key to delete. For lists: numeric index (1-based, like R vectors) to delete

Examples

Run this code
doc <- am_create()
am_put(doc, AM_ROOT, "temp", "value")
am_delete(doc, AM_ROOT, "temp")
am_close(doc)

Run the code above in your browser using DataLab