Reorder levels in COBRAPlot object to achieve desired ordering in figure legends etc. If facetted(cobraplot) is TRUE, the releveling will be applied to the "method" column. If facetted(cobraplot) is FALSE, it will be applied to the "fullmethod" column.
Examples
data(cobradata_example_sval)
cobraperf <- calculate_performance(cobradata_example_sval,
binary_truth = "status", aspects = "fpr")
#> column Method3 is being ignored for NBRS calculations
#> column Method3 is being ignored for FPR calculations
cobraplot <- prepare_data_for_plot(cobraperf, colorscheme = "Dark2",
incltruth = TRUE)
cobraplot <- reorder_levels(cobraplot, c("Method2", "Method1"))