Skip to contents

Prints a frequency table as an HTML table using the gt package

Usage

print_frequency_table(
  df,
  title = "Dominant Type of Land Cover Change",
  labels = NULL,
  freq_col = "Freq",
  table_width = 700,
  font_size = 12
)

Arguments

df

The data frame to convert into an HTML table.

title

The title for the table. Default: "Top 10 Type of Land Cover Change".

labels

A named vector of column labels to use in place of the original column names. Names of the vector should match the column names in the df. Default: NULL (original names are used).

freq_col

The name of the column to format as frequency. Default: "Freq".

table_width

The width of the table in pixels. Default: 700.

font_size

The font size in pixels. Default: 12.

Value

A gt table object.

Author

Dony Indiarto