Thanks, it was a matter of reshaping the data matrix as I usually have 
it, ie:
datos <- 
data.frame(x=abs(round(rnorm(100,10,5))),y=abs(round(rnorm(100,2,1))),f=factor(round(runif(100,1,3))))

to become:

datos2 <- 
data.frame(V1=c(datos[,1],datos[,2]),"VAR"=c(rep("x",100),rep("y",100)),f=factor(c(datos[,3],datos[,3])))

and then
require(lattice)
barchart(V1~VAR|f,data=datos2)

I get horizontal lines in the bars that I do not understand, though.

Agus




Deepayan Sarkar escribió:
> On 3/26/08, Agustin Lobo <[EMAIL PROTECTED]> wrote:
>> Dear list,
>>
>>  Is there any way of making barplots as a Trellis graphic?
> 
> Yes, the function to use is 'barchart'.
> 
> -Deepayan
> 

-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: [EMAIL PROTECTED]
http://www.ija.csic.es/gt/obster

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to