On Jan 2, 2010, at 6:51 PM, Jay wrote:

Hello!

one more question about xyplot. If I have data which have space in the
column names, say "xyz 123". How do I create a working graph where
this text is displayed in the legend key?

Now when I try something like xyplot("xyz 123" ~ variable1, data =
mydata, .......) I get nothing.

You could try bquote() around the troublesome string.

(And why would you do such a thing in the first place, anyway???)

Also, is it possible to genrate the graph with xyplot(mydata[,1] ~
variable1, data = mydata, .......) and then later in the code specify
the names that should be displayed in the legend?

(It's not exactly clear what you mean by legend, but from the fact that you xyplot call has nothing that would clearly need a legend or key, I'm guessing you actually mean the x and y labels.)

libary(lattice)
?xyplot # and pay attention to the xlab and ylab arguments
?update

--

David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
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