set_text: Set text content

View source: R/create_units.r

set_textR Documentation

Set text content

Description

Set text content

Usage

set_text(
  name,
  value,
  before = NULL,
  after = NULL,
  label = NULL,
  ...,
  offset = 0
)

Arguments

name

The name of the field. Must be unique within a unit.

value

The content of the field. Can be given as a single string, the name of a column in data (for create_units), or any expression.

before

The text can have a context before and after the coding unit. For example, the data.frame could be a keyword in context listing with the columns "pre", "keyword" and "post" (see for instance quanteda's kwic function). These could then be set to the "before", "column" and "after" arguments, respectively. NOTE that if a before or after context is specified, all other text fields before or after the current will also be considered context.

after

See 'before' argument

label

An expression or character value to label the text field. Coders will then see this label where this field starts.

...

Style settings, passed to style

offset

An expression (most likely a column). If the text is a part of a bigger, original text, you can include the offset for the character position where it starts. This is relevant if you want to import or export span annotations for which the offset refers to the original text.

Value

Only meant to be used inside of create_units or create_unit.


ccs-amsterdam/ccsAnnotator documentation built on March 19, 2024, 2:14 a.m.