[R] Annoyance with %/%

ALBERTO VIEIRA FERREIRA MONTEIRO albmont at centroin.com.br
Wed Mar 11 17:04:44 CET 2015

> shouldn't your last expression be:
> if (any(tst)) big.vector.1[tst] <- big.vector.2[tst]
Sure, that was a typo.

Also, I know that `%%` does not make sense neither for Inf nor for big
numbers, but `%/%` - since it's "only" a special case of `/` - should
make sense; it should be "equivalent" (obviously doing some
machine-optimization) to `%/%` <- function(x, y) floor(x / y) (which
works fine for infinite x and non-zero y)

Alberto Monteiro

More information about the R-help mailing list