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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.