fixed problems in functions.R with new lm() behavior for trends: LSP, AO, NP...