Answers for "modulus operator in r"

2

find remainder r

> # Floating Division:
> 5/2
[1] 2.5
> 
> # Integer Division:
> 5%/%2
[1] 2
> 
> # Remainder:
> 5%%2
[1] 1
Posted by: Guest on July-09-2020
0

modulo in r

# mod
10 %% 2  # 0

9 %% 2  # 1
Posted by: Guest on February-24-2021

Browse Popular Code Answers by Language