Skip to content
Prev 10947 / 398502 Next

Modulus operator??

"M. Edward Borasky" <znmeb at aracnet.com> writes:
Yes, another % symbol:
[1] 0

...which you'd obviously be excused for not knowing about. Looks like
we have a typo in the R-language manual. (We also have a curious
anomaly:
records % modulus

which indicates that the deparser does think % is a binary operator.
However, the tokenizer is not going to let you enter an unmatched %
because of the special operators %*%, %o%, %/%, etc. The "%" function
does not exist either. Perhaps this is a relic and R in its infancy
actually allowed x % y ?)