a regular time series ('rts' under S+ and 'ts' under R)
type
the type of model, either type="additive" (by default), or type="multiplicative"
lag
The lag between the two observations used to calculate differences. By default, lag=1
order
The order of the difference corresponds to the number of times it is applied, by default order=1
ends
either "NAs" (fill first values that are not calculable with NAs), or "fill" (fill them with the average of following observations before applying the filter, by default), or "drop" (do not fill them). If ends="drop", the filtered series will be shorter than the initial one by lag*order. In all other cases, the filtered series is as large as the initial one