isRational: Is an object from class rational Test if an object is of...

Description Usage Arguments Note Examples

Description

Is an object from class rational

Test if an object is of class "rationalS3", "rationalS4", or "rationalR6"

Usage

1
2
3
4
5
6
7
is.rationalS3(e1, inherit = FALSE)

is.rationalR6(e1, inherit = FALSE)

is.rationalS4(e1, inherit = FALSE)

is.rational(e1, inherit = FALSE)

Arguments

e1

object to be tested

inherit

should inheritence be checked? default=FALSE

Note

The inherit parameter is included for speed. There is a performance boost from not checking for inheritence in the class structure. When inherit==FALSE, the the first class returned from class() is checked to be equal to "rationalXX". When inherit==TRUE, then the methods::is() function is used.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10

bertcarnell/rational documentation built on May 10, 2021, 8:32 p.m.