Adjusted memory allocation so that R would work