Added new R-scripts adn fixed makefiles