Learn R Programming

tester (version 0.1.2)

is_multiple: Is multiple

Description

Tests if x is multiple of a given number

Usage

is_multiple(x, of)

Arguments

x
a numeric object
of
a given number

Examples

Run this code
is_multiple(5, of=5) # TRUE
is_multiple(15, of=5) # TRUE
is_multiple(3, of=5) # FALSE
is_multiple(2*pi, of=pi) # TRUE
is_multiple(matrix(1:6,2,3), of=2)

Run the code above in your browser using DataLab