Learn R Programming

automerge (version 0.3.0)

am_text_content: Get text content from a text object

Description

Retrieve the full text content from a text object as a string.

Usage

am_text_content(text_obj)

Value

Character string with the full text

Arguments

text_obj

An Automerge text object ID

Examples

Run this code
doc <- am_create()
am_put(doc, AM_ROOT, "doc", am_text("Hello"))
text_obj <- am_get(doc, AM_ROOT, "doc")
text_obj

text <- am_text_content(text_obj)
text  # "Hello"

am_close(doc)

Run the code above in your browser using DataLab