|
4 | 4 | #' the objective space to belong to the symmetric difference between the |
5 | 5 | #' Vorob'ev expectation and a realization of the (random) attained set. |
6 | 6 | #' |
7 | | -#' @inheritParams moocore::vorobT |
| 7 | +#' @inheritParams moocore::vorob_t |
8 | 8 | #' |
9 | | -#' @param VE,threshold Vorob'ev expectation and threshold, e.g., as returned |
10 | | -#' by [moocore::vorobT()]. |
| 9 | +#' @param ve,threshold Vorob'ev expectation and threshold, e.g., as returned |
| 10 | +#' by [moocore::vorob_t()]. |
11 | 11 | #' |
12 | 12 | #' @param nlevels (`integer(1)`)\cr Number of levels in which is divided the range of the |
13 | 13 | #' symmetric deviation. |
|
27 | 27 | #' |
28 | 28 | #' @author Mickael Binois |
29 | 29 | #' |
30 | | -#' @seealso [moocore::vorobT()] [moocore::vorobDev()] [eafplot()] |
| 30 | +#' @seealso [moocore::vorob_t()] [moocore::vorob_dev()] [eafplot()] |
31 | 31 | #' |
32 | 32 | #' @examples |
33 | 33 | #' data(CPFs, package = "moocore") |
34 | | -#' res <- moocore::vorobT(CPFs, reference = c(2, 200)) |
| 34 | +#' res <- moocore::vorob_t(CPFs, reference = c(2, 200)) |
35 | 35 | #' print(res$threshold) |
36 | 36 | #' |
37 | 37 | #' ## Display Vorob'ev expectation and attainment function |
|
43 | 43 | #' # Second style |
44 | 44 | #' eafplot(CPFs[,1:2], sets = CPFs[,3], percentiles = c(0, 20, 40, 60, 80, 100), |
45 | 45 | #' col = gray(seq(0.8, 0.1, length.out = 6)^0.5), type = "area", |
46 | | -#' legend.pos = "bottomleft", extra.points = res$VE, extra.col = "cyan", |
| 46 | +#' legend.pos = "bottomleft", extra.points = res$ve, extra.col = "cyan", |
47 | 47 | #' extra.legend = "VE", extra.lty = "solid", extra.pch = NA, extra.lwd = 2, |
48 | 48 | #' main = substitute(paste("Empirical attainment function, ",beta,"* = ", a, "%"), |
49 | 49 | #' list(a = formatC(res$threshold, digits = 2, format = "f")))) |
50 | 50 | #' # Vorob'ev deviation |
51 | | -#' VD <- moocore::vorobDev(CPFs, reference = c(2, 200), VE = res$VE) |
| 51 | +#' VD <- moocore::vorob_dev(CPFs, reference = c(2, 200), ve = res$ve) |
52 | 52 | #' # Display the symmetric deviation function. |
53 | | -#' symdevplot(CPFs, VE = res$VE, threshold = res$threshold, nlevels = 11) |
| 53 | +#' symdevplot(CPFs, ve = res$ve, threshold = res$threshold, nlevels = 11) |
54 | 54 | #' # Levels are adjusted automatically if too large. |
55 | | -#' symdevplot(CPFs, VE = res$VE, threshold = res$threshold, nlevels = 200, legend.pos = "none") |
| 55 | +#' symdevplot(CPFs, ve = res$ve, threshold = res$threshold, nlevels = 200, legend.pos = "none") |
56 | 56 | #' |
57 | 57 | #' # Use a different palette. |
58 | | -#' symdevplot(CPFs, VE = res$VE, threshold = res$threshold, nlevels = 11, col.fun = heat.colors) |
| 58 | +#' symdevplot(CPFs, ve = res$ve, threshold = res$threshold, nlevels = 11, col.fun = heat.colors) |
59 | 59 | #' |
60 | 60 | #' @references |
61 | 61 | #' |
|
72 | 72 | # surfaces and does not create the plot nor the legend (but returns the info |
73 | 73 | # needed to create a legend), so that one can use the function to add stuff to |
74 | 74 | # another plot. |
75 | | -symdevplot <- function(x, sets, VE, threshold, nlevels = 11, |
| 75 | +symdevplot <- function(x, sets, ve, threshold, nlevels = 11, |
76 | 76 | ve.col = "blue", xlim = NULL, ylim = NULL, |
77 | 77 | legend.pos = "topright", main = "Symmetric deviation function", |
78 | 78 | col.fun = function(n) gray(seq(0, 0.9, length.out = n)^2)) |
@@ -137,7 +137,7 @@ symdevplot <- function(x, sets, VE, threshold, nlevels = 11, |
137 | 137 | plot_eaf_axis (xaxis_side, xlab, las = las, sci.notation = sci.notation) |
138 | 138 | plot_eaf_axis (yaxis_side, ylab, las = las, sci.notation = sci.notation, |
139 | 139 | line = 2.2) |
140 | | - plot_eaf_full_lines(list(VE), extreme, maximise, |
| 140 | + plot_eaf_full_lines(list(ve), extreme, maximise, |
141 | 141 | col = ve.col, lty = 1, lwd = 2) |
142 | 142 | }) |
143 | 143 |
|
|
0 commit comments