https://researchdatapod.com/how-to-solve-r-error-invalid-argument-to-unary-operator/
How to Solve R Error: invalid argument to unary operator