或者帮我看看后面两句话什么意思吧,就可以操作了
The function first determines the trend component using a moving average (if filter is NULL, a symmetric window with equal weights is used), and removes it from the time series. Then, the seasonal figure is computed by averaging, for each time unit, over all periods. The seasonal figure is then centered.
You have to apply centered moving average of order 12 (if monthly data) or 4 (if quarterly date) to get the trend-cycle pattern. Subtract the trend-cycle from the original data, the rest is seasoal component and irregular component. Seasonal component is the average of monthly data. For example, your data is a monthly one from 2009 to 2011, then the seasonal index for January is the average of January 2009, January 2010 and January 2011.