R Argument Is Not Numeric Or Logical