According to the "Arithmetic operators" help page (accessible via?" percent percent "),
'x mod y' is indicated by 'percent percent'.
which is only helpful if you've done enough programming to know that this is referring to modular division, i.e. integer-divide x by y and return the remainder. This is applicable in a wide range of situations. For example (from @GavinSimpson in comments), %% is useful if you are running a loop and want to print some kind of progress indicator to the screen every nth iteration (e.g. use if (i %% 10 == 0) { #do something} to do something every 10th iteration).
Since %% also works for floating-point numbers in R, I've just dug up an example where if (any(wts %% 1 != 0)) is used to test where any of the wts values are non-integer.
Enhance your data skills with our comprehensive Data Analyst Certification – Enroll now!