Re: [R] Lattice: arbitrary abline in multiple histograms

2010-10-13 Thread Alejo C.S.
Thanks all, works perfect. Alejo 2010/10/13 Dennis Murphy > Hi: > > David was on the right track... > > library(reshape) # for the melt() function below > > rnorm(100,5,3) -> A > rnorm(100,7,3) -> B > rnorm(100,4,1) -> C > df <- melt(data.frame(A, B, C)) > names(df)[1] <- 'gp' > > histogra

Re: [R] Lattice: arbitrary abline in multiple histograms

2010-10-13 Thread Dennis Murphy
Hi: David was on the right track... library(reshape) # for the melt() function below rnorm(100,5,3) -> A rnorm(100,7,3) -> B rnorm(100,4,1) -> C df <- melt(data.frame(A, B, C)) names(df)[1] <- 'gp' histogram(~ value | gp, data=df, layout=c(3,1), nint=50, panel=function(x, ..., groups){

Re: [R] Lattice: arbitrary abline in multiple histograms

2010-10-12 Thread David Winsemius
On Oct 12, 2010, at 9:13 PM, David Winsemius wrote: On Oct 12, 2010, at 8:21 PM, Alejo C.S. wrote: Dear list. I have three histograms and I want to add a vertical abline in a different place in each plot. The next example will plot a vertical line at x=5.5 in the three plots: rnorm(10

Re: [R] Lattice: arbitrary abline in multiple histograms

2010-10-12 Thread David Winsemius
On Oct 12, 2010, at 8:21 PM, Alejo C.S. wrote: Dear list. I have three histograms and I want to add a vertical abline in a different place in each plot. The next example will plot a vertical line at x=5.5 in the three plots: rnorm(100,5,3) -> A rnorm(100,7,3) -> B rnorm(100,4,1) -> C rep

[R] Lattice: arbitrary abline in multiple histograms

2010-10-12 Thread Alejo C.S.
Dear list. I have three histograms and I want to add a vertical abline in a different place in each plot. The next example will plot a vertical line at x=5.5 in the three plots: rnorm(100,5,3) -> A rnorm(100,7,3) -> B rnorm(100,4,1) -> C rep(c("A","B","C"),each=100) -> grp data.frame(G=grp,D=c(A,