am_delete_path: Delete value at path

View source: R/convenience.R

am_delete_pathR Documentation

Delete value at path

Description

Delete a value from an Automerge document using a path vector.

Usage

am_delete_path(doc, path)

Arguments

doc

An Automerge document

path

Character vector, numeric vector, or list of mixed types specifying the path to the value to delete

Value

The document (invisibly)

Examples

doc <- am_create()
am_put_path(doc, c("user", "address", "city"), "NYC")
am_put_path(doc, c("user", "name"), "Alice")

# Delete nested key
am_delete_path(doc, c("user", "address"))

# Address should be gone
am_get_path(doc, c("user", "address"))  # NULL

am_close(doc)


automerge documentation built on Feb. 5, 2026, 5:08 p.m.