Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] Lattice graphics with combined plot types

Shawn Way

2005-12-15

Replies:

The data is of two forms, ie one numeric and another ordinal ie 1.5 and
<.5. The X Value is a factor.

I'm trying to create a lattice conditioned plot with the following
characteristics:

1) The plot is conditioned using the form (Conductivity~Day|Valve)
2) The plot should use a barplot for the ordinal (<.5) and dots for the
numeric (1.5)
3) A line should be created specifying a limit (ie 0.5)

What I would like is the bar on Day 3 to be a dot at 0.5 (a red one would
be even better)


I have the following working:

data <-
data.frame(Conductivity=c(.24,.24,.5),Day=as.factor(c(1,2,3)),Valve=as.factor(c("60-V-234","60-V-234","60-V-234")))

print(barchart(Conductivity~Day|Valve,
    data=data,
    horizontial=FALSE,
#     type="p",
    xlab=list(label="Day",cex=3),
    ylab=list(label=expression(paste("Endotoxin (EU/mL)")),cex=3),
    ylim=c(0,1),
#     index.cond=list(c(2,1)),
    scales=list(x=list(rot=90,cex=2),y=list(cex=2))
        ,panel=function (x,y,...) {
          panel.barchart(x,y,...)
          panel.abline(h=0.25,col="red")
        }
#     main="Stable Pressure for 70-DS-005 Protocol 02-634-02B"
        )
)



Any thoughts? I know it's something simple, I just cannot see it...

Thanks in advance.


-------------------------------------------------------------------------------
Shawn Way
14 Cambridge Center
Cambridge, MA 02142

Ph:617-679-4488
 [[alternative HTML version deleted]]

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.