compareplot: Bar plot divided by three groupings

Description Usage Arguments Value Examples

View source: R/Rfunctions.R

Description

Bar plot divided by three groupings

Usage

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, ...)

Arguments

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.large.scale here~~

box.width.small.scale

box.width.small.scale here~~

box.show.mean

here~~

box.show.box

here~~

box.show.whiskers

box.show.whiskers here~~

...

Other arguments to pass to lattice function

Value

Plot

Examples

 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
 )

taRifx documentation built on April 14, 2020, 6:27 p.m.

Related to compareplot in taRifx...