See https://cran.r-project.org/web/packages/treemap/index.html for the details of the treemap function

treemap_wrapper(
  .DF,
  .Depth = 2,
  .Palette = "Set2",
  .FigTitle,
  .FigTitleSize = 12,
  .LastLabelCol = "orange",
  .SaveDir = "../man/figures",
  .SaveName,
  .SaveScaler = 1
)

Arguments

.DF

Input data frame. The data frame needs to include index columns (need to be first columns) and a value column.

.Depth

Grouping depth of the tree; the columns will be used. The first 2 columns in .DF will be index in treemap

.Palette

Color palette (RColorBrewer is used)

.FigTitle

Figure title

.FigTitleSize

Size of title font

.LastLabelCol

Color of the last label

.SaveDir

The directory for saving the plot; the default is man/figures.

.SaveName

Name of the saved png file in .SaveDir

.SaveScaler

A scaler controling the size (dpi = 300)

Value

A saved plot in .SaveDir