How i can Find mod of two numbers in r? I know in MATLAB we can use "mod" but I am not sure about r. I searched the help and couldn't find mod function in r.
There is a %%
operator
> 5 %% 1
[1] 0
> 5 %% 2
[1] 1
> 5 %% 3
[1] 2
> 5 %% 4
[1] 1
> 5 %% 5
[1] 0
> 5 %% 6
[1] 5
You can use ?'%%'
to get its detailed description
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With