Provide a list of options to the general plotting functions such as xplot_scatter in order to create appropriate data input for ggplot2.

data_opt(
.problem = NULL,
.subprob = NULL,
.method = NULL,
.source = "data",
simtab = FALSE,
filter = NULL,
tidy = FALSE,
index_col = NULL,
value_col = NULL,
post_processing = NULL
)

## Arguments

.problem The problem to be used, by default returns the last one. The subproblem to be used, by default returns the last one. The estimation method to be used, by default returns the last one. Define the location of the data in the xpdb. Should be either 'data' to use the output tables or the name of an output file attached to the xpdb. Only used when 'data' is defined as the source and .problem is default. Should the data be coming from an estimation or a simulation table. A function used to filter the data e.g. filter = function(x) x[x$TIME > 20, ] where x is the data. Logical, whether the data should be transformed to tidy data. Only used when 'tidy' is defined a TRUE and value_col is NULL. Column names to use as index when tidying the data. Only used when 'tidy' is defined a TRUE and index_col is NULL. Column names to be stacked when tidying the data. A function used to modify the data after it has been tidied up e.g. post_processing = function(x) dplyr::mutate(.data = x, variable = as.factor(.$variable)) where x is the tidy data.

xplot_distrib xplot_qq xplot_scatter

## Examples

data_opt(.problem = 1, .source = 'data', simtab = TRUE)#> $problem #> [1] 1 #> #>$subprob
#> NULL
#>
#> $method #> NULL #> #>$source
#> [1] "data"
#>
#> $simtab #> [1] TRUE #> #>$filter
#> NULL
#>
#> $tidy #> [1] FALSE #> #>$index_col
#> NULL
#>
#> $value_col #> NULL #> #>$post_processing
#> NULL
#>