Description Usage Arguments Value Examples
Function to plot the Error Comparison
1 2 3 4 | plot_errors(dataIn, plotType = c("boxplot"))
## S3 method for class 'errprof'
plot_errors(dataIn, plotType = c("boxplot"))
|
dataIn |
an errprof object returned from |
plotType |
chr string indicating plot type, accepted values are |
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"
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.