| trend | R Documentation | 
Estimate trend component
trend(x, p)
x | 
 Time series data  | 
p | 
 Polynomial order (1 linear, 2 quadratic, etc.)  | 
Returns a vector the same length as x.
Subtract from x to obtain residuals.
The returned vector is the least squares fit of a polynomial to the data.
season
y = trend(uspop,2)
plotc(uspop,y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.