corp_concordance: Concordance

View source: R/corp_concordance.R

corp_concordanceR Documentation

Concordance

Description

Concordances from corp_text and corp_cooccurrence objects.

Usage

  corp_concordance(obj, span, nodes, collocates, context)

  ## S3 method for class 'corp_concordance'
print(x, collocates = attr(x, "collocates"),
                  collocate_marker = "*", as_data_table = FALSE, ...)

Arguments

obj

A corp_text or a corp_cooccurrence object.

span

A character string defining the co-occurrence span. See details section in corp_surface.

For corp_cooccurrence objects this defaults to the span used to create the object.

nodes

A character vector of node types or character string representing a single node type. If supplied, only concordance lines for the specified node types will be displayed.

For corp_cooccurrence objects this defaults to the nodes used to create the object.

collocates

A character vector of collocate types or character string representing a single collocate type. If supplied, only concordance lines for the specified collocate types will be selected (i.e. act as a filter for corp_concordance).

For corp_cooccurrence objects this defaults to the collocates used to create the object.

For print collocates is used to determine which collocate types to highlight; and does not act as a filter. See the "intro" vignette for an example: vignette("intro", package = "CorporaCoCo"). Defaults to the collocates passed to the corp_concordance function.

context

The number of context tokens to be displayed. Default is 3.

x

A corp_concordance object.

collocate_marker

The characters used to highlight the highlighted collocates. Default is '*'.

as_data_table

Print the internal data.table object.

...

Ignored.

Value

Returns a corp_concordance object.


CorporaCoCo documentation built on Aug. 8, 2022, 5:09 p.m.