powered by
Replace or insert values at the root of an Automerge document using [[<- or $<-. These operators provide R-idiomatic modification.
[[<-
$<-
# S3 method for am_doc [[(x, i) <- value# S3 method for am_doc $(x, name) <- value
# S3 method for am_doc $(x, name) <- value
The document (invisibly)
An Automerge document
Key name (character)
Value to store
Key name (for $<- operator)
doc <- am_create() doc[["name"]] <- "Bob" doc$age <- 25L
Run the code above in your browser using DataLab