Description Usage Arguments Value Examples
Bar plot divided by three groupings
| 1 2 3 4 5 6 7 |   compareplot(formula, data.frame, show.outlines = FALSE,
    main = "", x.label = "", div.axis.major = 10,
    div.axis.minor = 20, log.x = FALSE,
    colors.plot = c("salmon", "blue", "olivedrab", "cyan", "brown", "green", "purple"),
    panel = "panel.tuftebox", box.width.large.scale = 0.4,
    box.width.small.scale = 0.25, box.show.mean = TRUE,
    box.show.box = FALSE, box.show.whiskers = FALSE, ...)
 | 
| formula | Plot formula. Of the form: ~cts|group1*group2*group3 , where cts is the continuous data you want to make boxplots out of, and group_ are factors to group by in descending heirarchical order. | 
| data.frame | Data.frame containing data | 
| show.outlines | Whether to include boxes around plots or leave it open | 
| main | Plot text | 
| x.label | X axis label | 
| div.axis.major | How many major axis ticks to use | 
| div.axis.minor | How many minor axis ticks to use | 
| log.x | Log transform the x data? | 
| colors.plot | Plot colors | 
| panel | Panel function to use | 
| box.width.large.scale | 
 | 
| box.width.small.scale | 
 | 
| box.show.mean | here~~ | 
| box.show.box | here~~ | 
| box.show.whiskers | 
 | 
| ... | Other arguments to pass to lattice function | 
Plot
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | library(datasets)
cw <- transform(ChickWeight,
 Time = cut(ChickWeight$Time,4)
 )
cw$Chick <- as.factor( sample(LETTERS[seq(3)], nrow(cw), replace=TRUE) )
levels(cw$Diet) <- c("Low Fat","Hi Fat","Low Prot.","Hi Prot.")
compareplot(~weight | Diet * Time * Chick,
 data.frame=cw ,
 main = "Chick Weights",
 box.show.mean=FALSE,
 box.show.whiskers=FALSE,
 box.show.box=FALSE
 )
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.