plot_errors {imputeTestbench} | R Documentation |
Function to plot the Error Comparison
Description
Function to plot the Error Comparison
Usage
plot_errors(dataIn, plotType = c("boxplot"))
## S3 method for class 'errprof'
plot_errors(dataIn, plotType = c("boxplot"))
Arguments
dataIn |
an errprof object returned from |
plotType |
chr string indicating plot type, accepted values are |
Value
A ggplot object that can be further modified. The entire range of errors are shown if plotType = "boxplot"
, otherwise the averages are shown if plotType = "bar"
or "line"
.
Examples
aa <- impute_errors(dataIn = nottem)
# default plot
plot_errors(aa)
## Not run:
# bar plot of averages at each repetition
plot_errors(aa, plotType = 'bar')
# line plot of averages at each repetition
plot_errors(aa, plotType = 'line')
# change the plot aesthetics
library(ggplot2)
p <- plot_errors(aa)
p + scale_fill_brewer(palette = 'Paired', guide_legend(title = 'Default'))
p + theme(legend.position = 'top')
p + theme_minimal()
p + ggtitle('Distribution of error for imputed values')
p + scale_y_continuous('RMSE')
## End(Not run)
[Package imputeTestbench version 3.0.3 Index]