Using various aesthetics, plot_diagnostics() can visualise the
performance of all combinations of up to 4 different arguments simultaneously.
plot_diagnostics(
object,
focused_args = NULL,
average_out_non_focused_args = TRUE,
plot_order = NULL
)an object of class 'testargs'
the arguments we wish to plot. If NULL, all
arguments are plotted (i.e., focused_args = object@arg_names)
logical indicating whether we should average over the non-focused arguments
specifies the order in which we are to assign
arguments to the various aesthetics. If NULL, the
arguments are assigned based on their type, in the order 'numeric',
'integer', 'factor', 'character', and 'logical'.
Otherwise, plot_order should be an integer vector with the same length
as focused_args
a facetted 'ggplot' object, where:
the columns of the facet are split by the diagnostics
the y-axis corresponds to the values of the diagnostics
the x-axis corresponds to the first argument
the colour scale and grouping correspond to the second argument (if present)
if a third argument is present, facet_grid() is used, whereby columns correspond to levels of the third argument, and rows correspond to diagnostics. Note that facet_grid() forces a given row to share a common y-scale, so the plot would be misleading if diagnostics were kept as columns
the shape of the points corresponds to the fourth argument (if present)
# NOT RUN {
## See ?test_arguments
# }
Run the code above in your browser using DataLab