Learn R Programming

SpeedReader (version 0.9.1)

color_word_table: A function to generate LaTeX output from a dataframe containing covariates and top words.

Description

A function to generate LaTeX output from a dataframe containing covariates and top words.

Usage

color_word_table(word_table, covariate_columns = 1, word_columns = 4:13,
  min_black = 30, print_first = 60, all_same = FALSE, remove_words = "",
  second_table = NULL, max_char_width = 60, bold_covariates = T)

Arguments

word_table

A dataframe with optional covariates and then some number of fields each of which is a top word.

covariate_columns

The columns (if any) in the word table(s) that contain covariates which will be printed verbatim.

word_columns

The columns in the word table(s) that contain the actual words we wish to print.

min_black

Defaults to 30 and indicates how light the text for infrequently used words can become.

print_first

Defualts to printing the first 40 rows. If set to -1, then all rows will be printed.

all_same

If TRUE then the color of all words will be the same and at the maximum value.

remove_words

A user supplied list of stopwords that should be removed before printing top words.

second_table

if not NULL, then two tables are output side by side, following the same formatting and row widths.

max_char_width

This sepcifies the maximum number of characters that can be displayed per line (in order to avoid lines in the table spilling over). Defaults to 60 which is appropriate for the two column PNAS style.

bold_covariates

If TRUE then any covariate values provided will be output in bold font to make them easier to distinguish from topic top words.

Value

Concatenates output to the console, no output is returned at present.