R Documentation |
Print methods for free objects
## S3 method for class 'free' print(x,...) as.character_free(m,latex=getOption("latex"))
x |
Object of class |
m |
A two-row matrix in function |
latex |
Boolean, with codeTRUE meaning to print latex-friendly
output including curly braces, and default |
... |
Further arguments, currently ignored |
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(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("symbols")
to
unhelpful things like rep("a",20)
without complaining (but don't
actually do it, you crazy fool).
Robin K. S. Hankin
char_to_free
## default symbols: abc(26) rfree(1,10) # if we need more than 26: options(symbols=state.name) rfree(10,4) # or even: jj <- letters[1:10] options(symbols=apply(expand.grid(jj,jj),1,paste,collapse="")) rfree(10,10,100,4) options(symbols=NULL) # NULL is interpreted as letters a-z rfree(10,4) # back to normal
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.