Skip to content
Prev 14 / 885 Next

checking even/odd in R

Dear Albyn,

I thought about rounding but was concerned that the arithmetic would still
be performed on real numbers. This is true even if the left argument to %%
is coerced to an integer. (round itself produces a double-precision floating
point number, not an integer.) I'm not sure whether this is a realistic
worry.

Regards,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
--------------------------------