is_multiple: Is multiple

Description Usage Arguments Examples

Description

Tests if x is multiple of a given number

Usage

1
  is_multiple(x, of)

Arguments

x

a numeric object

of

a given number

Examples

1
2
3
4
5
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)

Example output

[1] TRUE
[1] TRUE
[1] FALSE
[1] TRUE
      [,1]  [,2]  [,3]
[1,] FALSE FALSE FALSE
[2,]  TRUE  TRUE  TRUE

tester documentation built on May 2, 2019, 1:09 p.m.