[R] Syntax Help for xyplot()
Rich Shepard
rshepard at appl-ecosys.com
Tue Oct 25 00:11:06 CEST 2011
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
More information about the R-help
mailing list