div | R Documentation |
Integer division.
div(n, m)
n |
numeric vector (preferably of integers) |
m |
integer vector (positive, zero, or negative) |
div(n, m)
is integer division, that is discards the fractional part,
with the same effect as n %/% m
.
It can be defined as floor(n/m)
.
A numeric (integer) value or vector/matrix.
mod
, rem
div(c(-5:5), 5) div(c(-5:5), -5) div(c(1, -1), 0) #=> Inf -Inf div(0,c(0, 1)) #=> NaN 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.