Php Use External Variable In Function In R