identity | R Documentation |
Create and test for the identity element
is.id(x)
id(n)
## S3 method for class 'free'
is.id(x)
x |
Object of class |
n |
Strictly positive integer |
Function id()
returns a vector of n
free objects, all of
which are the identity element. Do not ask what happens if n=0
.
Function is.id()
returns a Boolean indicating whether an element
is the identity or not. The identity can also be generated using
as.free(0)
.
Robin K. S. Hankin
id()
as.free(0) # convenient R idiom for creating the identity
x <- rfree(10,3)
stopifnot(all(x == x + as.free(0)))
stopifnot(all(is.id(x-x)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.