Remove the system dependency of r