Setting up R environment