plot_errors: Function to plot the Error Comparison

Description Usage Arguments Value Examples

Description

Function to plot the Error Comparison

Usage

1
2
3
4
plot_errors(dataIn, plotType = c("boxplot"))

## S3 method for class 'errprof'
plot_errors(dataIn, plotType = c("boxplot"))

Arguments

dataIn

an errprof object returned from impute_errors

plotType

chr string indicating plot type, accepted values are "boxplot", "bar", or "line"

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

 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)

imputeTestbench documentation built on July 6, 2019, 1:03 a.m.