Plot Treemaps Given File Path Data

plot_treemaps_from_path_data(path_data, root_path = "", name = "root",
  as_png = FALSE, n_levels = 2, output_dir = tempdir(),
  type = "value", args_png = list(), n_biggest = -1, depth = 1,
  types = c("size", "files"))

Arguments

path_data

data frame containing file path information as returned by read_file_info

root_path

path to the folder that contains all paths to be considered. By setting the root path to "/path/to/root" you can "zoom into" the treeplot, showing the contents below "/path/to/root" only. If root_path is "" (default) all paths in path_data are considered.

name

name to be used in png file name if as_png is set. If path_data is a list, the names of the list elements are used.

as_png

if TRUE (default) the plots are saved to png files in the directory given in output_dir (tempdir() by default). Otherwise they are plotted into the active graphical device.

n_levels

number of folder depth levels to be shown in the plots

output_dir

path to output directory if as_png = TRUE. Default: tempdir()

type

passed to treemap

args_png

list of arguments passed to png if as_png = TRUE

n_biggest

vector of integer, specifying the number(s) of biggest folders (in terms of size and number of files) in which to "zoom into". The position in the vector represents the folder depth. For example, if n_biggest = c(2, 1), the first element (2) indicates that sub-treemaps are produced for the two biggest subfolders below root_path: for root_path/biggest-1 and for root_path/biggest-2. The second element (1) indicates that further treemaps are generated only for the biggest subfolders below root_path/biggest-1 and root_path/biggest-2, respectively, in each case. The length of the vector n_biggest determines the maximal depth until which to generate treemaps. By setting an element to -1L you specify that sub-treemaps are generated for each subfolder on the corresponding folder depth.

depth

current depth of recursion

types

type(s) of treeplots: one or both of c("size", "files") (the default).