Learn R Programming

multicastR (version 1.3.0)

mc_table: Generate tables with summarized GRAID counts (WIP)

Description

Constructs simple tables with counts for certain combinations of GRAID form, person/animacy, and function symbols. In its current form, the GRAID categories counted for the tables are predetermined and cannot be changed by the user. The TEX files that can optionally be written by this function are used for the 'Corpus counts' in the Multi-CAST documentation.

Usage

mc_table(data, by = "all", format = "wide", write = FALSE,
  writeto = getwd(), output = "tex")

Arguments

data

A data.table in multicastR format.

by

Character. "all" places all data in one table, "corpus" generates one table for each corpus, and "text" one table for each text.

format

Unused. Will be used to select between "wide" and "long" table layouts.

write

Logical. If TRUE, writes output to file.

writeto

A directory to which to write output. Defaults to getwd. Ignored if write is FALSE.

output

Unused. Will be used to specify the file format to write as. Currently only TEX output is supported.

Value

A data.table with GRAID counts.

Examples

Run this code
# NOT RUN {
  # generate a summary table for the entire collection
  mc <- multicast()
  mc_table(mc)

  # generate a summary table for the English corpus
  mc_table(mc[corpus == "english", ])
# }

Run the code above in your browser using DataLab