ccOptions-class {categoryCompare} | R Documentation |
These objects store the various options required by categoryCompare for actually making comparisons and generating output.
Objects can be created by calls of the form new("ccOptions", listNames=c('list1','list2',etc))
.
This is the minimum call required, and will generate a ccOptions
object where comparisons are assumed between all the lists supplied. See the examples section for more examples of how to initialize new objects.
listNames
:Object of class "character"
The actual names of the various datasets defined in the ccData
object
compareNames
:Object of class "character"
Which lists to compare, each entry should be a comma separated list
compareIndx
:Object of class "list"
List indices for each of the comparison, not usually set by the user. Generated automatically.
compareColors
:Object of class "character"
For graphical and tabular output each comparison can be colored. Should be one color for each comparison. Can be either an n
by 3 matrix of rgb triples, or a character vector of hexadecimal color codes, or character vector of color names ('red','green','blue', etc)
cssClass
:Object of class "character"
Classnames used when generating HTML tables to color entries. Generated automatically upon initialization, or modifying compareNames
outType
:Object of class "character"
Sets the type of output generated by ccTables
. Valid types are "html", "text", "rcy3" or "none", default is "text" when the ccOptions
object is initialized without an outType
specified.
signature(object = "ccOptions")
: ...
signature(object = "ccOptions")
: ...
signature(object = "ccOptions")
: ...
signature(object = "ccOptions")
: ...
signature(object = "ccOptions")
: ...
signature(object = "ccOptions")
: ...
signature(object = "ccOptions")
: ...
signature(object = "ccOptions")
: ...
signature(object = "ccOptions")
: ...
signature(object = "ccOptions")
: ...
Robert M Flight
showClass("ccOptions") ## A very basic "ccOptions" for a comparison of two sets of data, "list1" and "list2" c1 <- new("ccOptions", listNames=c('list1','list2')) c1 ## Now lets get a little more complicated c1 <- new("ccOptions", listNames=c('list1','list2'), compareNames=c('list1,list2','list1,list3'), compareColors=c('red','blue')) c1 # set the type of output you want to eventually produce c1 <- new("ccOptions", listNames=c('list1','list2'), outType='html') c1 c1 <- new("ccOptions", listNames=c('list1','list2'), outType=c('html','text','none')) c1 ## Using RGB colors ccCols <- matrix(c(255,0,0, 0,0,255), nrow=2, ncol=3) ccCols <- rgb(ccCols, maxColorValue=255) c1 <- new("ccOptions", listNames=c('list1','list2','list3'), compareNames=c('list1,list2','list1,list3'), compareColors=ccCols) ## Using Hex colors c1 <- new("ccOptions", listNames=c('list1','list2','list3'), compareNames=c('list1,list2','list1,list3'), compareColors=c('#FF0000','#0000FF')) c1 ## or even using a color palette from R. ## Note that you need at least enough colors to cover all of individual and ## possible permutations (n!) if you use compareNames='all' c1 <- new("ccOptions", listNames=c('list1','list2','list3'), compareNames=c('list1,list2','list1,list3'), compareColors=rainbow(4)) c1