Hello!

I've tried to make a histogram with figure by using data but failed to make it.Could you help me to find the solution?

```
rain <- scan("http://robjhyndman.com/tsdldata/hurst/precip1.dat",skip=1)
rainseries <- ts(rain,start=c(1813))
rainseriesforecasts <- HoltWinters(rainseries, beta=FALSE, gamma=FALSE)
library("forecast")
rainseriesforecasts2 <- forecast:::forecast.HoltWinters(rainseriesforecasts, h=8)
rainseriesforecasts2
```

I made a function of plotForecastError as below and tried it to show a graph but got some errors.

```
plotForecastErrors <- function(forecasterrors)
{ mysd <- sd(forecasterrors)
mymin <- min(forecasterrors) - mysd*5
mymax <- max(forecasterrors) + mysd*3
mynorm <- rnorm(10000, mean=0, sd=mysd)
mymin2 <- min(mynorm)
mymax2 <- max(mynorm)
if (mymin2 < mymin) { mymin <- mymin2 }
if (mymax2 > mymax) { mymax <- mymax2 }
mybins <- seq(mymin, mymax, mybinsize)
hist(forecasterrors, col="red", freq=FALSE, breaks=mybins)
myhist <- hist(mynorm, plot=FALSE, breaks=mybins)
points(myhist$mids, myhist$density, type="l", col="blue", lwd=2) }
```

```
plotForecastErrors(rainseriesforecasts2$residuals)
Error in quantile.default(as.numeric(x), c(0.25, 0.75), na.rm = na.rm, :
missing values and NaN's not allowed if 'na.rm' is FALSE
```

Could you help me find any revisions for the function?

Thank you very much!

TG