color_word_table: A function to generate LaTeX output from a dataframe...

Description Usage Arguments Value

View source: R/color_word_table.R

Description

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

Usage

1
2
3
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.


matthewjdenny/SpeedReader documentation built on March 25, 2020, 5:32 p.m.