#this is the whole data frame and I tried the suggested and it looks like it
is working but will not plot. thanks agian

x <- structure(list(Yearmonth = structure(c(12L, 24L, 1L, 13L, 14L,
3L, 15L, 4L, 16L, 5L, 17L, 6L, 18L, 7L, 19L, 8L, 20L, 9L, 21L,
10L, 22L, 11L, 23L), .Label = c("2006-02", "2006-03", "2006-04",
"2006-05", "2006-06", "2006-07", "2006-08", "2006-09", "2006-10",
"2006-11", "2006-12", "2007-01", "2007-02", "2007-03", "2007-04",
"2007-05", "2007-06", "2007-07", "2007-08", "2007-09", "2007-10",
"2007-11", "2007-12", "2008-01"), class = "factor"), Site = structure(c(3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L), .Label = c("301", "520", "Betty's Branch",
"Butler Creek", "CLYO", "Downstream", "Horse Creek", "IP", "North Augusta",
"Stan's", "Stevens Creek", "Vogtle"), class = "factor"), River.Mile = c(215,

215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215,
215, 215, 215, 215, 215, 215, 215, 215, 215), Lagrangian = structure(c(1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L), .Label = c("No", "Yes"), class = "factor"),
    EventType = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label =
c("Regular",
    "Stormwater"), class = "factor"), Month = c(1L, 1L, 2L, 2L,
    3L, 4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L, 9L, 10L,
    10L, 11L, 11L, 12L, 12L), Year = c(2007L, 2008L, 2006L, 2007L,
    2007L, 2006L, 2007L, 2006L, 2007L, 2006L, 2007L, 2006L, 2007L,
    2006L, 2007L, 2006L, 2007L, 2006L, 2007L, 2006L, 2007L, 2006L,
    2007L), DCAA = c(87, 0, 95, 0, 96, 0, 0, 0, 93, 0, 0, 0,
    0, 0, 0, 79, 82, 0, 0, 0, 0, 0, 86), Decachlorobiphenyl = c(79,
    0, 65, 0, 83, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 93, 76, 0, 0,
    0, 0, 0, 74), Tetrachloro.m.xylene = c(90, 0, 86, 0, 83,
    0, 0, 0, 96, 0, 0, 0, 0, 0, 0, 95, 91, 0, 0, 0, 0, 0, 85),
    Alkalinity = c(15, 13, 12, 14, 13, 16, 13, 16, 13, 17, 13,
    19, 13, 14, 14, 15, 15, 14, 16, 14, 15, 13, 14), BOD..5.day = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Carbonaceous.BOD..5.day = c(0, 0, 0, 0, 0, 0.3,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Chloride = c(2.6,
    2.7, 3, 2.9, 2.8, 2.6, 2.7, 2.5, 3, 2.4, 2.8, 2.5, 2.7, 2.3,
    2.7, 2.5, 2.7, 3, 2.7, 2.6, 2.8, 2.6, 2.7), COD = c(0, 8.8,
    0, 0, 0, 13, 0, 0, 7.9, 5.9, 0, 0, 0, 0, 0, 0, 0, 6.6, 6.5,
    0, 0, 0, 12), Dissolved.Ammonia...N..phenate. = c(0, 0.095,
    0, 0, 0.072, 0.1, 0.17, 0.11, 0.12, 0, 0.055, 0, 0, 0.11,
    0, 0, 0.1, 0.15, 0.072, 0.078, 0.073, 0, 0.065), Dissolved.Chloride =
c(2.7,
    2.7, 0, 2.9, 3.4, 2.6, 2.7, 2.5, 2.9, 2.5, 0, 2.5, 2.7, 2.5,
    2.7, 2.4, 2.7, 2.4, 2.8, 2.7, 2.8, 2.6, 2.8), Dissolved.Mercury = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00013, 0, 0, 0, 0,
    0, 0, 0, 0, 0), Dissolved.Nitrate.Nitrite...N = c(0.092,
    0.16, 0.13, 0.14, 0.16, 1.4, 0.15, 0.18, 0.17, 0.21, 0.17,
    0.2, 0.19, 0.16, 0.18, 0.069, 0.048, 0.022, 0.2, 0.056, 0.068,
    0.082, 0.051), Dissolved.Nitrite...N = c(0, 0.0097, 0, 0.015,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0046, 0, 0.0051, 0.0034, 0,
    0.009, 0.0066, 0.016, 0, 0), Dissolved.Sulfate = c(2.7, 3.3,
    0, 3, 3, 2.5, 2.8, 1.7, 3.1, 2.1, 0.18, 2.5, 3, 2.3, 2.9,
    2.2, 2.8, 2.3, 2.7, 2.6, 5.8, 2.5, 2.8), DOC = c(2.1, 2,
    2.5, 2.1, 2.8, 2.4, 2.3, 2.3, 3.5, 2.1, 2.8, 2, 2.5, 1.9,
    2.4, 2, 2.2, 2.1, 2.2, 2.9, 2.2, 2.6, 2.2), Hardness..total. = c(0,
    0, 9.6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Mercury = c(0, 0, 9.1e-05, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Ortho.phosphorus = c(0,
    0, 0.057, 0.008, 0.016, 0.009, 0.028, 0.04, 0.039, 0.044,
    0.01, 0.038, 0, 0.089, 0, 0.046, 0.023, 0.019, 0.03, 0.074,
    0, 0.027, 0), Phosphorus = c(0, 0.011, 0.042, 0.013, 0.0092,
    0.015, 0.0085, 0.0057, 0.01, 0.01, 0.0068, 0.0099, 0.0073,
    0.0085, 0.008, 0.0072, 0.01, 0, 0.0086, 0, 0.014, 0.011,
    0.011), Silica..calculation. = c(0, 0, 9.4, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Sulfate = c(2.5,
    2.3, 2.5, 2.7, 3, 0.26, 2.9, 2.4, 3.5, 2.4, 3.1, 2.4, 3.1,
    2.2, 3, 2.5, 2.8, 2.4, 2.6, 4.1, 2.8, 2.4, 3.4), TDS = c(38,
    0, 21, 25, 46, 32, 46, 38, 27, 34, 64, 39, 57, 24, 33, 0,
    39, 37, 40, 29, 44, 32, 28), TIC = c(1.1, 3.6, 1.2, 0.99,
    1.6, 3.4, 2.4, 4.6, 1.2, 2.7, 2.2, 0.73, 3.5, 1.9, 1.6, 2.2,
    2.3, 2.4, 2, 2.2, 0.78, 2, 3.8), TKN = c(0.86, 0.42, 0.42,
    0.17, 0.12, 0.2, 0, 0.32, 0.2, 0.46, 0.24, 0, 0.35, 0.2,
    0.37, 0.54, 0.2, 0.18, 0.1, 0.25, 0, 0, 0.39), TOC = c(2,
    1.9, 2.2, 2, 2.3, 2.2, 2.3, 2.4, 2.8, 2.2, 2.6, 1.8, 2.7,
    2.2, 2.2, 2, 2.2, 1.9, 2.5, 2, 2.2, 2, 2.1), TSS = c(0.8,
    5.7, 0, 1, 1.8, 0, 1.4, 0, 1.1, 0, 8, 0.6, 1.3, 0.77, 0.5,
    1.1, 1, 1.3, 0.8, 1.1, 2.6, 0.4, 0.8), TVSS = c(0, 0, 0,
    0, 0, 3.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0), pH = c(6.28, 7.11, 7.2, 6.6, 7.46, 6.5, 6.31, 6.63, 6.2,
    6.87, 6.88, 6.68, 6.78, 6.61, 6.32, 6.96, 6.5, 6.92, 7.06,
    6.84, 6.82, 7.51, 7.16), X2.4.5.T = c(0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), X2.4.5.TP..Silvex. =
c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), X2.4.D = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), X2.4.DB = c(0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    X4.4..DDD = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0), X4.4..DDE = c(0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), X4.4..DDT = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Aldrin = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), alpha.BHC = c(0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0), alpha.Chlordane = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Aluminum = c(0.034,
    0.068, 0, 0.0091, 0.083, 0, 0.04, 0, 0.04, 0, 0, 0, 0.0094,
    0, 0, 0, 0.087, 0, 0, 0, 0.016, 0, 0.032), Aroclor.1016 = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Aroclor.1221 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Aroclor.1232 = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Aroclor.1242 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Aroclor.1248 = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Aroclor.1254 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Aroclor.1260 = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Arsenic = c(0, 0, 0, 0, 0, 0, 0.00046, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00034, 0, 0), beta.BHC = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Cadmium = c(0, 0, 8.1e-05, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0.0031, 0, 0, 0, 0, 0, 0, 0, 0, 0), Calcium = c(1.6,
    2.5, 1.9, 1.8, 2, 2.8, 2, 1.9, 2.3, 1.9, 2.3, 2, 2.4, 4.3,
    2.4, 2.1, 2.3, 1.8, 2.4, 1.5, 2.3, 1.6, 2.4), Chromium = c(0,
    0.0072, 0, 0.00036, 0, 0, 0.00092, 0, 8e-04, 0, 0.0011, 0,
    0.0013, 0.00039, 0.00078, 0.00064, 0, 0, 0.00043, 0, 0, 0,
    0), Cobalt = c(0, 0, 7.3e-05, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Copper = c(0.0012, 0.0012,
    0, 0.00069, 7e-04, 0.005, 0.00084, 0.0017, 0.0012, 0.0019,
    0.00067, 0.0013, 0.0014, 0.0099, 0.001, 0.0011, 0.00092,
    9e-04, 6e-04, 0, 0.00067, 0.00081, 0.00084), Dalapon = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), delta.BHC = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Dicamba = c(0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0), Dichloroprop = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Dieldrin = c(0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    Dinoseb = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0), Dissolved.Aluminum = c(0.017, 0,
    0, 0, 0.06, 0, 0.0097, 0, 0.027, 0, 0, 0, 0, 0, 0, 0, 0.085,
    0, 0, 0, 0.034, 0, 0), Dissolved.Arsenic = c(0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    Dissolved.Cadmium = c(0, 0, 0, 0, 0, 0.00016, 0, 4.2e-05,
    0, 0, 0, 0, 0, 0.00079, 4.7e-05, 0, 0, 0, 0, 0, 0, 0, 0),
    Dissolved.Calcium = c(1.7, 2.4, 0, 1.8, 2, 2.3, 2, 1.9, 2.3,
    2, 2.3, 2, 2.5, 2.1, 2.4, 2.1, 2.3, 1.8, 2.4, 1.5, 2.2, 1.6,
    2.4), Dissolved.Chromium = c(0, 0.0012, 0, 0, 0, 0, 0.00068,
    0, 0.00078, 0, 0.0012, 0, 0.001, 0, 0.00072, 0.00049, 0,
    0, 0.00046, 0.00037, 0.00038, 0, 0), Dissolved.Copper = c(0.002,
    0.00097, 0, 0.00087, 0.00084, 0.0024, 0.00089, 0.00083, 0.0012,
    0.0011, 0.00058, 0.0011, 0.001, 0.015, 0.0012, 0.00099, 0.00091,
    0.00084, 0.00066, 0, 0.00064, 9e-04, 0.00095), Dissolved.Iron = c(0.033,

    0.019, 0, 0.033, 0.047, 0.059, 0.041, 0, 0.032, 0.016, 0.037,
    0.0062, 0.023, 0.011, 0.0096, 0.026, 0.038, 0.015, 0.11,
    0, 0.029, 0.016, 0.028), Dissolved.Lead = c(1e-04, 0, 0,
    6.2e-05, 0, 0, 3.2e-05, 2e-05, 4.7e-05, 0, 2.1e-05, 0, 2.2e-05,
    6.2e-05, 2.7e-05, 1.8e-05, 0, 4.3e-05, 0, 0, 0, 0, 1.7e-05
    ), Dissolved.Magnesium = c(1.3, 1.3, 0, 1.2, 1.3, 1.4, 1.2,
    1.2, 1.4, 1.2, 1.4, 1.1, 1.5, 1.3, 1.3, 1.3, 1.3, 1.4, 1.3,
    1.3, 1.3, 1.3, 1.6), Dissolved.Manganese = c(0.012, 0.014,
    0, 0.0056, 0.0062, 0.017, 0.0048, 0.0071, 0.0094, 0.016,
    0.012, 0.012, 0.015, 0.048, 0.015, 0.42, 0.29, 0.19, 0.48,
    0.0026, 0.19, 0.0078, 0.0028), Dissolved.Nickel = c(0.00057,
    0.00042, 0, 0, 0.00034, 0.00033, 0, 0, 0.00047, 0, 0, 0,
    0, 0, 0.00037, 0.00044, 0, 0, 0, 0, 0.00032, 0, 3e-04),
Dissolved.Potassium = c(2.6,
    2.2, 0, 1.6, 2.7, 2.6, 2.6, 2.3, 3.2, 2.1, 2.6, 2.1, 1.4,
    2.4, 2.2, 2.6, 1.4, 2.5, 2.6, 2.5, 2.2, 2.5, 2.4), Dissolved.Selenium =
c(0.00034,
    0.00078, 0, 0, 0, 0, 0, 0.00028, 0, 0, 0, 0, 0, 0.00027,
    0, 0.00056, 0, 0.00031, 0, 0, 0.00032, 0, 0), Dissolved.Silicon = c(4.8,

    4.3, 0, 4.2, 5, 4.4, 4.8, 4.1, 5, 4.4, 4.6, 3.9, 4.7, 4.6,
    4, 4.2, 4.1, 4.6, 4.2, 4, 4.2, 4.5, 4.3), Dissolved.Sodium = c(2.8,
    3, 0, 2.7, 3, 3.6, 2.8, 3.3, 3.8, 2.9, 2.9, 2.8, 2, 3.5,
    3.8, 2.8, 4, 2.7, 3.7, 2.8, 2.5, 2.8, 2.7), Dissolved.Zinc = c(0.006,
    0.0026, 0, 0.016, 0.0053, 0.0077, 0.0042, 0.0041, 0.0069,
    0.0078, 0.0039, 0.0088, 0.003, 0.01, 0.0049, 0.0082, 0.0047,
    0.0056, 0.0043, 0, 0.0044, 0.004, 0.0075), Endosulfan.I = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Endosulfan.II = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Endosulfan.sulfate = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Endrin = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Endrin.aldehyde = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Endrin.ketone = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), gamma.BHC..Lindane. = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), gamma.Chlordane = c(0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Heptachlor = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Heptachlor.epoxide = c(0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Iron = c(0.067,
    0.24, 0.022, 0.075, 0.088, 0.12, 0.088, 0.02, 0.067, 0.037,
    0.076, 0.02, 0.05, 0.029, 0.024, 0.1, 0.15, 0.097, 0.19,
    0.051, 0.18, 0.048, 0.09), Lead = c(0, 0.00016, 0.00019,
    0.00012, 0, 0, 0, 0.00017, 7.2e-05, 1.6e-05, 5.9e-05, 0.00015,
    9e-05, 0.00034, 0, 0.00014, 0, 0.00011, 0.00015, 0, 0, 3.5e-05,
    7.3e-05), Magnesium = c(1.3, 1.4, 1.2, 1.2, 1.3, 1.5, 1.2,
    1.2, 1.4, 1.3, 1.4, 1.1, 1.5, 1.3, 1.4, 1.3, 1.3, 1.3, 1.4,
    1.3, 1.3, 1.3, 1.6), Manganese = c(0.022, 0.094, 0.0067,
    0.02, 0.012, 0.032, 0.012, 0.013, 0.015, 0.033, 0.022, 0.021,
    0.023, 0.11, 0.038, 0.46, 0.39, 0.24, 0.54, 0.05, 0.48, 0.037,
    0.056), MCPA = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0), MCPP = c(0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Methoxychlor = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Nickel = c(0.00087, 0.0034, 0.0013, 0.00045, 0.00031,
    0.00061, 0, 0, 0, 0.00029, 0, 0.00032, 0.00036, 0, 0.00031,
    0.00053, 0, 0, 0, 5e-04, 0, 0, 0), Potassium = c(2.6, 2.3,
    1.7, 1.6, 2.7, 3.1, 2.6, 2.3, 3.2, 2, 2.6, 2.1, 1.7, 2.4,
    2.3, 2.6, 1.4, 2.4, 2.7, 2.5, 2.3, 2.5, 2.4), Selenium = c(0.00048,
    0.00047, 0, 0, 0, 0, 0, 0.00053, 0, 0, 0, 0, 0, 0.00025,
    0, 0.00064, 0, 0, 0, 0, 0.00039, 0.00028, 0), Silicon = c(4.8,
    4.7, 4.4, 4.3, 5.1, 4.9, 4.6, 4.3, 4.8, 4.3, 4.7, 4, 4.7,
    4.5, 4.2, 4.1, 4, 4.4, 4.2, 4, 4.2, 4.4, 4.2), Sodium = c(2.8,
    3.2, 3, 2.8, 3, 4.3, 2.8, 3.4, 3.8, 2.8, 2.9, 2.8, 1.9, 3.2,
    3.9, 2.8, 4, 2.6, 3.7, 2.7, 2.4, 2.8, 2.7), Toxaphene = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0), Zinc = c(0.0052, 0.0026, 0.014, 0.0049, 0.004,
    0.011, 0.0031, 0.0028, 0.0036, 0.0053, 0, 0.0077, 0.0027,
    0.0081, 0.0063, 0.005, 0.0018, 0.0041, 0.0017, 0, 0.006,
    0.0028, 0.0066)), .Names = c("Yearmonth", "Site", "River.Mile",
"Lagrangian", "EventType", "Month", "Year", "DCAA", "Decachlorobiphenyl",
"Tetrachloro.m.xylene", "Alkalinity", "BOD..5.day",
"Carbonaceous.BOD..5.day",
"Chloride", "COD", "Dissolved.Ammonia...N..phenate.", "Dissolved.Chloride",
"Dissolved.Mercury", "Dissolved.Nitrate.Nitrite...N",
"Dissolved.Nitrite...N",
"Dissolved.Sulfate", "DOC", "Hardness..total.", "Mercury",
"Ortho.phosphorus",
"Phosphorus", "Silica..calculation.", "Sulfate", "TDS", "TIC",
"TKN", "TOC", "TSS", "TVSS", "pH", "X2.4.5.T", "X2.4.5.TP..Silvex.",
"X2.4.D", "X2.4.DB", "X4.4..DDD", "X4.4..DDE", "X4.4..DDT", "Aldrin",
"alpha.BHC", "alpha.Chlordane", "Aluminum", "Aroclor.1016", "Aroclor.1221",
"Aroclor.1232", "Aroclor.1242", "Aroclor.1248", "Aroclor.1254",
"Aroclor.1260", "Arsenic", "beta.BHC", "Cadmium", "Calcium",
"Chromium", "Cobalt", "Copper", "Dalapon", "delta.BHC", "Dicamba",
"Dichloroprop", "Dieldrin", "Dinoseb", "Dissolved.Aluminum",
"Dissolved.Arsenic", "Dissolved.Cadmium", "Dissolved.Calcium",
"Dissolved.Chromium", "Dissolved.Copper", "Dissolved.Iron",
"Dissolved.Lead",
"Dissolved.Magnesium", "Dissolved.Manganese", "Dissolved.Nickel",
"Dissolved.Potassium", "Dissolved.Selenium", "Dissolved.Silicon",
"Dissolved.Sodium", "Dissolved.Zinc", "Endosulfan.I", "Endosulfan.II",
"Endosulfan.sulfate", "Endrin", "Endrin.aldehyde", "Endrin.ketone",
"gamma.BHC..Lindane.", "gamma.Chlordane", "Heptachlor",
"Heptachlor.epoxide",
"Iron", "Lead", "Magnesium", "Manganese", "MCPA", "MCPP", "Methoxychlor",
"Nickel", "Potassium", "Selenium", "Silicon", "Sodium", "Toxaphene",
"Zinc"), row.names = c(NA, 23L), class = "data.frame")

On Tue, Jul 8, 2008 at 2:43 PM, Gabor Grothendieck <ggrothendieck@gmail.com>
wrote:

> There is no data in your data frame, just index info, so I assume you
> want a zero width time series:
>
> zoo(, as.yearmon(x$Yearmonth, "%Y-%m"))
>
> This also works but then you are left with a character date which you
> may not want:
>
> zoo(, x$Yearmonth)
>
>
> On Tue, Jul 8, 2008 at 1:43 PM, stephen sefick <ssefick@gmail.com> wrote:
> > #this is a subset of a larger data frame and I am okay with subsetting it
> as
> > there are redundant time stamps, but I would like to create a zoo object
> out
> > of this and I am having a hard #time figuring out how to do this  the
> date
> > structure is  year and then month
> >
> > x <- structure(list(Yearmonth = structure(c(12L, 24L, 1L, 13L, 14L,
> > 3L, 15L, 4L, 16L, 5L, 17L, 6L, 18L, 7L, 19L, 8L, 20L, 9L, 21L,
> > 10L, 22L, 11L, 23L), .Label = c("2006-02", "2006-03", "2006-04",
> > "2006-05", "2006-06", "2006-07", "2006-08", "2006-09", "2006-10",
> > "2006-11", "2006-12", "2007-01", "2007-02", "2007-03", "2007-04",
> > "2007-05", "2007-06", "2007-07", "2007-08", "2007-09", "2007-10",
> > "2007-11", "2007-12", "2008-01"), class = "factor"), Month = c(1L,
> > 1L, 2L, 2L, 3L, 4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L, 9L,
> > 10L, 10L, 11L, 11L, 12L, 12L)), .Names = c("Yearmonth", "Month"
> > ), class = "data.frame", row.names = c(NA, 23L))
> >
> > #thanks Stephen
> >
> > --
> > Let's not spend our time and resources thinking about things that are so
> > little or so large that all they really do for us is puff us up and make
> us
> > feel like gods. We are mammals, and have not exhausted the annoying
> little
> > problems of being mammals.
> >
> > -K. Mullis
> >
> >        [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > 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.
> >
>



-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods. We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

	[[alternative HTML version deleted]]

