hist_smoothing | R Documentation |
This function translate the histgram sequence into the smoothing data.
hist_smoothing(hist.data, width)
hist.data |
Histgram sequence |
width |
Width of the simple moving average method. width=1 means no smoothing. This value should be an intergral value. |
Smoothing histgram sequence
hist.data = c(1,5,7,5,5,4,3,1,0,0,0,4,4,8,5,5,5,5,3,3,3,7,7,8,3,3,1,3,5,0,0,2,3,3,0)
smooth = hist_smoothing(hist.data,3)
plot(hist.data,type="b")
lines(1:length(hist.data),smooth,col="red",lwd=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.