[R] Hmisc xYplot won't do conditioning on factors?

Ivan Adzhubey iadzhubey at rics.bwh.harvard.edu
Wed Feb 27 01:47:14 CET 2008


Hi,

I am trying to replace (lattice) standard xyplot with xYplot variant from 
Hmisc package to be able to add error bars to my plots. However, this does 
not work, e.g:

library(lattice)
d <- data.frame(
	SKU=gl(3, 1, 21, labels=c("a", "b", "c")), 
	Weekday=gl(7, 3, 21), 
	QCRate=runif(21))

xyplot(QCRate ~ Weekday | SKU, data=d)

(this plots nice 3 panels as per a,b,c conditionals)

library(Hmisc)
> xYplot(QCRate ~ Weekday | SKU, data=d)
Error in Summary.factor(1:7, na.rm = TRUE) :
  range not meaningful for factors

Is there a workaround?

Thanks,
Ivan

The information transmitted in this electronic communica...{{dropped:10}}



More information about the R-help mailing list