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

______________________________________________
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