mc_clauses {multicastR}R Documentation

Count clauses in a multicastR table

Description

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

Usage

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

## 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)


[Package multicastR version 2.0.0 Index]