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

From: Ivan Adzhubey <iadzhubey_at_rics.bwh.harvard.edu>
Date: Tue, 26 Feb 2008 19:47:14 -0500


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}}



R-help_at_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. Received on Wed 27 Feb 2008 - 00:53:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 29 Feb 2008 - 04:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive