moved R install script into cap