hist_smoothing: Smoothing histgram sequence by using simple moving average...

View source: R/histgram.R

hist_smoothingR Documentation

Smoothing histgram sequence by using simple moving average method

Description

This function translate the histgram sequence into the smoothing data.

Usage

hist_smoothing(hist.data, width)

Arguments

hist.data

Histgram sequence

width

Width of the simple moving average method. width=1 means no smoothing. This value should be an intergral value.

Value

Smoothing histgram sequence

Examples

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)

hmito/hmRLib documentation built on March 13, 2024, 9:41 p.m.