Message-ID: <alpine.LNX.2.00.1110241507230.30827@salmo.appl-ecosys.com>
Date: 2011-10-24T22:11:06Z
From: Rich Shepard
Subject: Syntax Help for xyplot()
In-Reply-To: <997BC8EB1265413FBA86A4FB2993C443@Gandalf>
On Mon, 24 Oct 2011, Daniel Nordlund wrote:
> you need to reorganize your data so that you have a single record (i.e.
> row) for each site/sampdate combination with the quant value for each of
> your params save in a column named by the param value (I don't remember
> all the param names so I used pn). For example your first two lines
> should be collapsed into a single line, e.g.
>
> site sampdate TDS Cond SO4 p4 p5 p6 p7
> BC-0.5 1996-06-02 530 NA 194 NA NA NA NA
Daniel,
Thank you. I thought that the data frame was not in the proper format. I'm
re-reading Phil Spctor's "Data Manipulation with R" and not seeing how to
reformat my base data frame to yield a data frame as defined above.
Learning how to do this reformating is my highest priority because the
books I have (and have read) tell me how to plot and do analyses but they
all assume data in the proper format. Mine isn't.
I'm sure a combination of subset() and select() will do the trick, but I'm
too new to R to have sufficient experience to get it right the first time.
Much appreciated,
Rich