Description Usage Arguments Examples
Rational Number Comparisons
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## S4 method for signature 'rationalS4,numeric'
Compare(e1, e2)
## S4 method for signature 'rationalS4,integer'
Compare(e1, e2)
## S4 method for signature 'numeric,rationalS4'
Compare(e1, e2)
## S4 method for signature 'integer,rationalS4'
Compare(e1, e2)
## S4 method for signature 'rationalS4,rationalS4'
Compare(e1, e2)
## S3 method for class 'rationalS3'
Ops(e1, e2)
## S3 method for class 'rationalR6'
Ops(e1, e2)
|
e1 |
rational numbers, integers, or numerics |
e2 |
rational numbers, integers, or numerics |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | a <- rational(1L, 3L, "S3")
b <- rational(3L, 4L, "S3")
d <- 3L
e <- 20.1
stopifnot(a != b)
stopifnot(!(a == b))
stopifnot(a < b)
stopifnot(!(a > b))
stopifnot(a <= b)
stopifnot(!(a >= b))
stopifnot(a != d)
stopifnot(!(a == d))
stopifnot(a < d)
stopifnot(!(a > d))
stopifnot(a <= d)
stopifnot(!(a >= d))
stopifnot(a != e)
stopifnot(!(a == e))
stopifnot(a < e)
stopifnot(!(a > e))
stopifnot(a <= e)
stopifnot(!(a >= e))
a <- rational(1L, 3L, "R6")
b <- rational(3L, 4L, "R6")
d <- 3L
e <- 20.1
stopifnot(a != b)
stopifnot(!(a == b))
stopifnot(a < b)
stopifnot(!(a > b))
stopifnot(a <= b)
stopifnot(!(a >= b))
stopifnot(a != d)
stopifnot(!(a == d))
stopifnot(a < d)
stopifnot(!(a > d))
stopifnot(a <= d)
stopifnot(!(a >= d))
stopifnot(a != e)
stopifnot(!(a == e))
stopifnot(a < e)
stopifnot(!(a > e))
stopifnot(a <= e)
stopifnot(!(a >= e))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.