Skip to contents

Create confusion matrix as flextable

Usage

aa_flextable(
  aalist,
  caption = NULL,
  type = "percent",
  decimals_cells = NULL,
  decimals_stats = NULL,
  col_numbers = FALSE,
  diagonal = TRUE,
  scale_accuracy = 1,
  rm_x = FALSE,
  class_labels = NULL,
  font_size = 10,
  font_name = NULL,
  capitalize = TRUE,
  header_height = NULL,
  rm_zero = TRUE,
  footer = TRUE,
  autonum = NULL,
  out_file = NULL
)

Arguments

aalist

output from aa_card or aa_stratified

caption

add caption to table header

type

either "count", "proportion" or "percent" (default)

decimals_cells

number of digits

decimals_stats

number of digits

col_numbers

Set TRUE to replace column names with numbers

diagonal

formats diagonal cells as italic

scale_accuracy

Default 1, Set to 100 to obtain percent values

rm_x

set TRUE to remove leading X in column names

class_labels

Vector of class labels to append to row names

font_size

font_size

font_name

font_name

capitalize

capitalize first letter in class names

header_height

header_height

rm_zero

remove zeros (True/False)

Display overall accuracy in footer. Default TRUE

autonum

an autonum representation. See officer::run_autonum().

out_file

output file name (*.docx or *.html)

Value

flextable

Details

Create confusion matrix as flextable in wide format

Author

Dirk Pflugmacher