smoothing a plot in r

Babak Bastan
Thu, 20 Mar 2014 16:50:48 -0000

Hi friends

Iwould like to smooth my plot. I have a plot which is wiggly and I want to
smooth it. here is my data

539, 532, 531, 538, 544, 554, 575, 571, 543, 559, 511, 525, 512, 540, 535,
514, 524, 527, 532, 547, 564, 548, 572, 564, 549, 532, 519, 520, 520, 543,
550, 542, 528, 523, 531, 548, 554, 574, 575, 560, 534, 518, 511, 519, 527,
554, 543, 527, 540, 524, 523, 539, 569, 552, 553, 540, 522, 522, 492, 519,
532, 527, 532, 550, 535, 517, 551, 548, 571, 574, 539, 535, 515, 512, 510,
527, 533, 543, 540, 533, 519, 539, 555, 542, 574, 543, 555, 539, 507, 522,
518, 519, 516, 546, 523, 530, 532, 539, 540, 568, 554, 563, 550, 526, 509,
492, 525, 519, 527, 526, 515, 530, 531, 553, 563, 562, 576, 568, 539, 516,
512, 500, 516, 542, 522, 527, 523, 531

I am using lowess function but it has no meaning for me,

plot(
lowess(datalist),col="blue",type="l",ylab="Values",lwd=2)

how can I smooth my plot correctly?

thanks alot

	[[alternative HTML version deleted]]