R Modulo Operator. I was also very confused, but if you understand that the result of the %% operator is the remainder of a division, it. In computing, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another (called the modulus of the operation).
Learn how to use arithmetic and logical operators in r.
Example using the modulo operator. The modulo operation is supported for integers and floating point numbers. It provides a way to execute code once every several iterations of a loop. I would assume that all three print functions would return the same number, however when i don't use the modulo function % the returned number is negative.
Nessun commento:
Posta un commento