simpledecomp decomposes a vector into trend, season and irregular component by linear regression approach
simpledecomp
Useful links