Modified Trend.R function to encompass fitting of polynomial with aribtrary (but constrained) degree/order.