Learn R Programming

matlab2r (version 1.5.0)

rem: Remainder after division½

Description

Rreturns the remainder after division of a by b, where a is the dividend and b is the divisor. This function is often called the remainder operation. The rem function follows the convention that rem(a,0) is NaN.

Usage

rem(a, b)

Value

The remainder

Arguments

a

the dividend

b

the divisor

Author

Waldir Leoncio

Examples

Run this code
rem(23, 5)
rem(1:5, 3)
rem(c(-4, -1, 7, 9), 3)  #FIXME
rem(c(0, 3.5, 5.9, 6.2, 9, 4 * pi), 2 * pi)

Run the code above in your browser using DataLab