Boxplot showing the Root Means Square Prediction Difference of of a cross validation procedure.
# S3 method for cvalidation
plot(
x,
violin = FALSE,
export = FALSE,
order_box = FALSE,
x.lab = NULL,
y.lab = NULL,
size.tex.lab = 12,
file.type = "pdf",
file.name = NULL,
plot_theme = theme_metan(),
width = 6,
height = 6,
resolution = 300,
col.violin = "gray90",
col.boxplot = "gray70",
col.boxplot.win = "cyan",
width.boxplot = 0.6,
x.lim = NULL,
x.breaks = waiver(),
...
)
An object of class cvalidation
fitted with the functions
cv_ammi()
, cv_ammif()
, cv_blup()
, or a
bound object fitted with bind_cv()
.
Define if a violin plot is used with boxplot. Default is 'TRUE'
Export (or not) the plot. Default is T
.
Logical argument. If TRUE
then the boxplots will be
ordered according to the values of the RMSPD.
The label of x-axis. New arguments can be inserted as
x.lab = 'my x label'
.
The label of y-axis. New arguments can be inserted as
y.lab = 'my y label'
.
The size of the text in axis text and labels.
The type of file to be exported. Default is pdf
,
Graphic can also be exported in *.tiff
format by declaring
file.type = 'tiff'
.
The name of the file for exportation, default is
NULL
, i.e. the files are automatically named.
The graphical theme of the plot. Default is
plot_theme = theme_metan()
. For more details,see
ggplot2::theme()
.
The width 'inch' of the plot. Default is 6
.
The height 'inch' of the plot. Default is 6
.
The resolution of the plot. Parameter valid if
file.type = 'tiff'
is used. Default is 300
(300 dpi)
Parameter valid if violin = T
. Define the color of
the violin plot. Default is 'gray90.
Define the color for boxplot. Default is 'gray70'.
Define the color for boxplot of the best model. Default is 'cyan'.
The width of boxplots. Default is 0.2
.
The range of x-axis. Default is NULL
(maximum and minimum
values of the data set). New arguments can be inserted as x.lim = c(x.min, x.max)
.
The breaks to be plotted in the x-axis. Default is
authomatic breaks
. New arguments can be inserted as x.breaks = c(breaks)
Currently not used.
An object of class gg, ggplot
.
Five statistics are shown in this type of plot. The lower and upper hinges correspond to the first and third quartiles (the 25th and 75th percentiles). The upper whisker extends from the hinge to the largest value no further than 1.5 * IQR from the hinge (where IQR is the inter-quartile range). The lower whisker extends from the hinge to the smallest value at most 1.5 * IQR of the hinge. Data beyond the end of the whiskers are considered outlying points.
# NOT RUN {
# }
# NOT RUN {
validation <- cv_ammif(data_ge2,
resp = EH,
gen = GEN,
env = ENV,
rep = REP,
nboot = 5)
plot(validation)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab