Learn R Programming

frab (version 0.0-6)

zero: The zero frab object

Description

Test for a frab object's being zero (empty).

Usage

zero(...)
is.zero(x)
is.empty(x)

Value

Function zero() returns the zero frab object, function

is.zero() a Boolean

Arguments

x

Object of class frab

...

Further arguments (currently ignored)

Author

Robin K. S. Hankin

Details

Function zero() returns the empty frab object; this is the additive identity \(0\) with property \(x+0=0+x=x\).

Function is.zero() returns TRUE if its argument is indeed the zero object.

Function is.empty() is a synonym for is.zero(). Sometimes one is thinking about the free Abelian group, in which case is.zero() makes more sense, and sometimes one is thinking about maps and tables, in which case is.empty() is more appropriate.

Examples

Run this code

zero()
zero() + zero()

x <- rfrab()

x+zero() == x

is.zero(zero())

Run the code above in your browser using DataLab