nested_loop_base_data | R Documentation |
This function transforms data into a format which is used in the
nested_loop_base_plot
function to produce basic nested loop
plots. The data is basically transformed to long format with some
additional information to facilitate facetting, identifying spus (see
explanation in nested_loop_plot
) and plotting steps for the
design parameters. All parameter definitions are the same as in
nested_loop_plot
. See details there for further usage notes.
nested_loop_base_data(
resdf,
x,
grid_rows = NULL,
grid_cols = NULL,
steps = NULL,
steps_add = NULL,
methods = NULL,
pass_through = NULL,
trans = identity,
design_parameters_values = NULL,
design_type = "full",
methods_col_name = "Method",
replace_labels = NULL,
spu_x_shift = 1,
parameter_decreasing = FALSE
)
resdf |
Data.frame with data to be visualised in wide format with columns: *param1 param2 ... paramN measurement1 measurement2 ... measurementM*. *param1* to *paramN* represent the design parameters, *measurement1* to *measurementM* the measured / summarised results for M different models / methods for the given parameters. Design parameters are mostly treated as factors and can thus be ordered by the user by specifying factor levels. The only exception is the parameter which is used for the x-axis - it is treated as a continuous variable. |
x |
Name of column in resdf which defines the x-axis of the plot. Converted to numeric values for x-axis via as.numeric. |
grid_rows , grid_cols |
NULL or names of columns in resdf which define the facetting rows and columns
of the plot. Correspond to rows and cols argument in
|
steps |
NULL or character vector with names of columns in resdf which define further parameter configurations and which define smallest plottable units (see Details below). |
steps_add |
Character vector with names of columns in resdf which should be added to the plot as steps, but do not represent parameters. These are just added for information and do not influence the data display. Example: show separation rate (reasonably rounded) for given parameter specifications. |
methods |
NULL or character vector with names of columns in resdf which contain
results from the experimental study and should be drawn in the nested
loop plot. Default NULL means
that all columns not mentioned in |
pass_through |
NULL or character vector with names of columns in resdf which will be passed to post-processing, without otherwise affecting the plot. Useful to add e.g. panel specific decorations (see corresponding section in the Gallery vignette of this package). |
trans |
Function name or object, to be called via |
design_parameters_values |
NULL or Named list of vectors. Each entry in the list represents one of the loop
variables ( |
design_type |
Either "full" or "partial". If "full", then resdf is completed to a full design, where possibly missing entries (because a specific parameter combination does not have data) are set to NA. Steps, axes etc. are then drawn as if the data was available. Useful to show explicitly which scenarios have not been done in the case if the design is almost full. If "partial" then parameter configurations without data are dropped from the plot and now shown. |
methods_col_name |
String which is used as column name for the column which encodes which method was used for which result. |
replace_labels |
NULL or named list of character vectors which facilitates renaming of design
parameter values. The names correspond to names of design parameters as
specified by resdf. Each entry is a vector of the form
|
spu_x_shift |
Distance between two contigous data spus. Given in units of the x-axis. |
parameter_decreasing |
Logical - if TRUE, design parameters are sorted to be decreasing (in terms of factor levels). |
Returns a named list with components
Data.frame with data to be plotted.
List of user specified input.
Names of columns in plotdf which encode specific information, inlcuding all user specified column names which represent steps, facets and results
In detail, plotdf contains columns with information on building the facet grid and the steps, labels for the plot (columns with the suffix "_labels_") and the values to be plotted (*x_coord, y_coord*).
Input saves out the user input (*x, grid_cols, grid_rows, steps, parameter_decreasing*).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.