Php Find First Non Numeric Argument To Mathematical Function In R