print {freegroup} | R Documentation |
Print free objects
Description
Print methods for free objects
Usage
## S3 method for class 'free'
print(x,...)
as.character_free(m,latex=getOption("latex"))
Arguments
x |
Object of class |
m |
A two-row matrix in function |
latex |
Boolean, with |
... |
Further arguments, currently ignored |
Note
The print method does not change the internal representation of a
free
object, which is a list of integer matrices.
The default print method uses multiplicative notation (powers) which is
inconsistent with the juxtaposition method “+
”.
The print method has special dispensation for length-zero free objects but these are not handled entirely consistently.
The default print method uses lowercase letters a-z, but it is possible
to override this using options("freegroup_symbols" = foo)
, where
foo
is a character vector. This is desirable if you have more
than 26 symbols, because unallocated symbols appear as NA
.
The package will allow the user to set
options("freegroup_symbols")
to unhelpful things like
rep("a",20)
without complaining (but don't actually do it, you
crazy fool).
Author(s)
Robin K. S. Hankin
See Also
Examples
## default symbols:
abc(26)
rfree(1,10)
# if we need more than 26:
options(freegroup_symbols=state.name)
rfree(10,4)
# or even:
jj <- letters[1:10]
options(freegroup_symbols=apply(expand.grid(jj,jj),1,paste,collapse=""))
rfree(10,10,100,4)
options(freegroup_symbols=NULL) # NULL is interpreted as letters a-z
rfree(10,4) # back to normal