Message-ID: <eb555e660608291554y42a50e01rc7bde68a7fa3fe51@mail.gmail.com>
Date: 2006-08-29T22:54:30Z
From: Deepayan Sarkar
Subject: lattice/xyplot: plotting 4 variables in two panels - can this be done?
In-Reply-To: <C83C5E3DEEE97E498B74729A33F6EAEC038783D1@DJFPOST01.djf.agrsci.dk>
On 8/29/06, S?ren H?jsgaard <Soren.Hojsgaard at agrsci.dk> wrote:
> Hi,
> I would like to create a plot of y1,y2,y3,y4 against x for several subjects such that y1 and y2 are plotted against x in one panel and y3 and y4 against x in another panel. Thus if there are 3 subjects I should end up with 6 panels. Is there a simple way of doing so (i.e. without calling xyplot() several times, and then padding the results together)??
You need to transform your data into a suitable form. See ?reshape and
?make.groups.
Deepayan