add a r version of trend prediction...