Learn R Programming

multicastR (version 1.2.0)

mc_clauses: Count clause units in a multicastR table (WIP)

Description

Counts the number of clause units (bounded by the <##>, <#>, or <%> annotation symbols) in a multicastR table.

Usage

mc_clauses(mcdata, bytext = FALSE)

Arguments

mcdata

A data.table in multicastR format, containing minimally a corpus column with the names of the corpora and a graid column with GRAID annotation values.

bytext

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

Value

A data.table with the number of valid clause units in each corpus, the total number of clause units, the number of non-analyzed clause units ("NC"), and the percentage the later make up of the total.

See Also

multicast

Examples

Run this code
# NOT RUN {
  # count clause units in the most recent version
  # of the Multi-CAST data, by corpus
  n <- mc_count_clauses(multicast())

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

  # number of clauses units in the whole collection
  sum(n$nClauses)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab