[R] reshape2 errors on data frame

Rich Shepard rshepard at appl-ecosys.com
Thu Jul 5 19:36:27 CEST 2012


On Thu, 5 Jul 2012, John Kane wrote:

> It would be very helpful to have some sample data to play with.

John,

   dput() doesn't want to cooperate so here are 100 rows from the raw data
file that can be input with read.table("sample.dat", header = T, sep = "|"):

'site'|'sampdate'|'preeq0'|'param'|'quant'|'ceneq1'|'floor'|'ceiling'
'A'|'2007-12-12'|1|'Ag'|0.005|1|0|0.005
'A'|'2007-12-12'|1|'Al'|0.106|0|0.106|0.106
'A'|'2007-12-12'|1|'CO3'|1|1|0|1
'A'|'2007-12-12'|1|'HCO3'|231.000|0|231.000|231.000
'A'|'2007-12-12'|1|'Alk_tot'|231.000|0|231.000|231.000
'A'|'2007-12-12'|1|'As'|0.011|0|0.011|0.011
'A'|'2007-12-12'|1|'Ba'|0.001|1|0|0.001
'A'|'2007-12-12'|1|'Be'|0.002|1|0|0.002
'A'|'2007-12-12'|1|'Bi'|0.001|1|0|0.001
'A'|'2007-12-12'|1|'Ca'|100.000|0|100.000|100.000
'A'|'2007-12-12'|1|'Cd'|0.001|1|0|0.001
'A'|'2007-12-12'|1|'Cl'|1.430|0|1.430|1.430
'A'|'2007-12-12'|1|'Co'|0.001|1|0|0.001
'A'|'2007-12-12'|1|'Cr'|0.006|1|0|0.006
'A'|'2007-12-12'|1|'Cu'|0.024|0|0.024|0.024
'A'|'2007-12-12'|1|'DO'|4.960|0|4.960|4.960
'A'|'2007-12-12'|1|'Fe'|4.110|0|4.110|4.110
'A'|'2007-12-12'|1|'K'|0.001|1|0|0.001
'A'|'2007-12-12'|1|'Mg'|9.560|0|9.560|9.560
'A'|'2007-12-12'|1|'Mn'|0.035|0|0.035|0.035
'A'|'2007-12-12'|1|'Mo'|0.001|1|0|0.001
'A'|'2007-12-12'|1|'Na'|0.970|0|0.970|0.970
'A'|'2007-12-12'|1|'NH4'|0.01|1|0|0.01
'A'|'2007-12-12'|1|'NO3-NO2'|0.293|0|0.293|0.293
'A'|'2007-12-12'|1|'Pb'|0.025|0|0.025|0.025
'A'|'2007-12-12'|1|'pH'|7.800|0|7.800|7.800
'A'|'2007-12-12'|1|'Sb'|0.001|1|0|0.001
'A'|'2007-12-12'|1|'SC'|630.000|0|630.000|630.000
'A'|'2007-12-12'|1|'Se'|0.001|0|0.001|0.001
'A'|'2007-12-12'|1|'SO4'|65.800|0|65.800|65.800
'A'|'2007-12-12'|1|'Sr'|0.001|1|0|0.001
'A'|'2007-12-12'|1|'TDS'|320.000|0|320.000|320.000
'A'|'2007-12-12'|1|'Tl'|0.001|1|0|0.001
'A'|'2007-12-12'|1|'V'|0.001|1|0|0.001
'A'|'2007-12-12'|1|'Zn'|11.400|0|11.400|11.400
'A'|'2008-03-15'|1|'Ag'|0.005|1|0|0.005
'A'|'2008-03-15'|1|'Al'|0.08|1|0|0.08
'A'|'2008-03-15'|1|'CO3'|1|1|0|1
'A'|'2008-03-15'|1|'HCO3'|228.000|0|228.000|228.000
'A'|'2008-03-15'|1|'Alk_tot'|228.000|0|228.000|228.000
'A'|'2008-03-15'|1|'As'|0.001|0|0.001|0.001
'A'|'2008-03-15'|1|'Ba'|0.001|1|0|0.001
'A'|'2008-03-15'|1|'Be'|0.002|1|0|0.002
'A'|'2008-03-15'|1|'Bi'|0.001|1|0|0.001
'A'|'2008-03-15'|1|'Ca'|88.400|0|88.400|88.400
'A'|'2008-03-15'|1|'Cd'|0.001|1|0|0.001
'A'|'2008-03-15'|1|'Cl'|1.340|0|1.340|1.340
'A'|'2008-03-15'|1|'Co'|0.001|1|0|0.001
'A'|'2008-03-15'|1|'Cr'|0.006|1|0|0.006
'A'|'2008-03-15'|1|'Cu'|0.014|0|0.014|0.014
'A'|'2008-03-15'|1|'DO'|9.910|0|9.910|9.910
'A'|'2008-03-15'|1|'Fe'|0.309|0|0.309|0.309
'A'|'2008-03-15'|1|'Hg'|0.001|1|0|0.001
'A'|'2008-03-15'|1|'K'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Ag'|0.005|1|0|0.005
'B-2'|'1992-02-29'|0|'Al'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'As'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Ba'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Be'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Bi'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Ca'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Cd'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Cl'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Co'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Cr'|0.03|1|0|0.03
'B-2'|'1992-02-29'|0|'Cu'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Fe'|1.2|1|0|1.2
'B-2'|'1992-02-29'|0|'Hg'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'K'|19.800|0|19.800|19.800
'B-2'|'1992-02-29'|0|'Mg'|1|1|0|1
'B-2'|'1992-02-29'|0|'Mn'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Mo'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Na'|0.03|1|0|0.03
'B-2'|'1992-02-29'|0|'NH4'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Pb'|0.025|0|0.025|0.025
'B-2'|'1992-02-29'|0|'pH'|8.480|0|8.480|8.480
'B-2'|'1992-02-29'|0|'Sb'|0.01|1|0|0.01
'B-2'|'1992-02-29'|0|'Se'|0.003|1|0|0.003
'B-2'|'1992-02-29'|0|'Sr'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'TDS'|15|1|0|15
'B-2'|'1992-02-29'|0|'Tl'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'V'|0.001|1|0|0.001
'B-2'|'1992-02-29'|0|'Zn'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Ag'|0.005|1|0|0.005
'B-2'|'1992-04-02'|0|'Al'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'As'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Ba'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Be'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Bi'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Ca'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Cd'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Cl'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Co'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Cr'|0.03|1|0|0.03
'B-2'|'1992-04-02'|0|'Cu'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Fe'|1.2|1|0|1.2
'B-2'|'1992-04-02'|0|'Hg'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'K'|0.001|1|0|0.001
'B-2'|'1992-04-02'|0|'Mg'|1|1|0|1
'B-2'|'1992-04-02'|0|'Mn'|0.001|1|0|0.001

Rich



More information about the R-help mailing list