R improvements