This function produces an interactive display for collecting,
organizing, and displaying the plots generated in build_plots
.
The bulk of the work is done by trelliscopejs::trelliscope
.
Please see the documentation of this package for additional details.
build_display(
plot_data,
display_name,
output_dir,
nrow = 1,
ncol = 2,
sort_var = "variable",
sort_direction = "asc",
self_contained = FALSE,
...
)
A tibble
output from build_plots
.
Character string of the name to give the trelliscope display.
The file path of the directory to create in which the outputs of the display will be written. Caution: the function will overwrite any files stored in this directory!
The number of rows of plots to display.
The number of columns of plots to display.
Character string of the cognostic to sort on. Defaults to the variable name, but can be any of the cognostics of interest.
Character string specifying direction of sort; can be "asc" for ascending or "desc" for descending. Defaults to "asc".
Logical; whether to render the display as a
self-contained HTML document. This should be set
to TRUE
for including the display in an
R markdown HTML document, but generally can be left
as FALSE
for producing an output directory
where plots and relevant files will be stored.
additional arguments passed to trelliscopejs::trelliscope
.