Learn R Programming

automerge (version 0.2.0)

replace-am_doc: Replace in Automerge document root

Description

Replace or insert values at the root of an Automerge document using [[<- or $<-. These operators provide R-idiomatic modification.

Usage

# S3 method for am_doc
[[(x, i) <- value

# S3 method for am_doc $(x, name) <- value

Value

The document (invisibly)

Arguments

x

An Automerge document

i

Key name (character)

value

Value to store

name

Key name (for $<- operator)

Examples

Run this code
doc <- am_create()
doc[["name"]] <- "Bob"
doc$age <- 25L

Run the code above in your browser using DataLab