mc_clauses: Count clauses in a multicastR table

Description Usage Arguments Value See Also Examples

View source: R/mc_clauses.R

Description

mc_clauses counts the number of clause units (bounded by the <##> or <#> GRAID annotation symbols) in a multicastR table.

Usage

1
mc_clauses(x, bytext = FALSE, printToConsole = FALSE)

Arguments

x

A data.frame in multicastR format. This table minimally requires the corpus and graid columns with the names of the corpora and the GRAID annotation values, respectively, as well as the text column if bytext is set to TRUE.

bytext

Logical. If FALSE, calculate the number of clause units for each corpus. If TRUE, count for each text separately. FALSE by default.

printToConsole

Logical. If TRUE, prints the table to the console (using message). FALSE by default.

Value

A data.frame with the corpus, text (if bytext is TRUE), the number of valid clause units in each corpus (nClause), the total number of clause units (nAll), the number of clause units not analyzed (nNC), and the percentage the later make up of the total (pNC).

See Also

multicast, mc_index, mc_metadata, mc_referents, mc_clauses

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
  # count clause units in the most recent version
  # of the Multi-CAST data, by corpus
  n <- mc_clauses(multicast())

  # count by text instead
  m <- mc_clauses(multicast(), bytext = TRUE)

  # number of clauses units in the whole collection
  sum(n$nClauses)

## End(Not run)

multicastR documentation built on Feb. 23, 2021, 1:06 a.m.