Setup R properly.