edited to include dput(Nitrate_set) output:
structure(list(SITE.NO = structure(c(41L, 42L, 41L, 3L, 35L,
42L, 40L, 40L, 40L, 1L, 40L, 1L, 40L, 40L, 16L, 40L, 42L, 40L,
40L, 42L, 1L, 42L, 40L, 1L, 40L, 1L, 40L, 4L, 42L, 21L, 15L,
5L, 36L, 40L, 40L, 2L, 41L, 6L, 2L, 12L, 42L, 19L, 2L, 1L, 1L,
1L, 2L, 42L, 1L, 2L, 7L, 1L, 39L, 2L, 2L, 2L, 2L, 39L, 11L, 37L,
2L, 1L, 1L, 1L, 1L, 32L, 1L, 41L, 2L, 2L, 1L, 2L, 1L, 1L, 2L,
1L, 2L, 40L, 42L, 1L, 2L, 38L, 1L, 1L, 2L, 2L, 2L, 41L, 38L,
1L, 8L, 42L, 42L, 1L, 2L, 2L, 33L, 1L, 2L, 18L, 2L, 1L, 2L, 2L,
1L, 41L, 1L, 2L, 1L, 40L, 1L, 2L, 2L, 2L, 1L, 2L, 41L, 10L, 14L,
2L, 2L, 2L, 2L, 42L, 9L, 1L, 1L, 2L, 2L, 2L, 38L, 1L, 1L, 2L,
2L, 38L, 42L, 38L, 40L, 42L, 41L, 1L, 1L, 2L, 38L, 38L, 1L, 38L,
2L, 1L, 2L, 2L, 2L, 17L, 2L, 42L, 41L, 2L, 1L, 1L, 2L, 1L, 38L,
1L, 1L, 38L, 38L, 38L, 38L, 2L, 1L, 2L, 26L, 38L, 38L, 1L, 2L,
38L, 38L, 2L, 1L, 1L, 1L, 38L, 38L, 1L, 31L, 2L, 2L, 1L, 1L,
34L, 24L, 38L, 2L, 28L, 38L, 25L, 38L, 38L, 38L, 38L, 39L, 1L,
38L, 1L, 29L, 38L, 38L, 1L, 38L, 2L, 2L, 22L, 1L, 27L, 1L, 30L,
38L, 38L, 1L, 2L, 2L, 38L, 2L, 38L, 38L, 38L, 13L, 38L, 1L, 38L,
1L, 23L, 2L, 39L, 20L, 38L, 38L, 2L, 38L, 38L, 38L, 38L, 38L,
38L, 38L, 38L, 38L, 1L, 38L, 38L, 41L, 38L, 1L, 38L, 38L, 2L,
38L, 38L, 38L, 38L, 1L, 38L, 1L, 38L, 2L, 2L, 38L, 1L, 40L, 2L,
42L, 41L, 42L, 38L, 42L, 38L, 41L, 2L, 42L, 1L, 38L, 38L, 42L,
2L, 42L, 38L, 38L, 2L, 2L, 2L, 39L, 40L, 2L, 42L, 1L, 1L, 38L,
40L, 41L, 2L, 41L, 41L, 1L, 2L, 41L, 1L, 39L, 41L, 1L, 41L, 40L,
1L, 39L, 39L, 2L, 40L, 38L, 1L, 2L, 2L, 38L, 39L, 1L, 2L, 38L,
41L, 38L, 38L, 2L, 38L, 38L, 41L, 2L, 39L, 43L, 39L, 41L, 43L,
43L, 43L, 43L, 41L, 39L, 39L, 41L, 43L, 41L, 39L, 39L, 39L, 39L,
39L, 39L, 43L, 43L, 43L, 43L, 43L, 41L), .Label = c("1110056",
"1111019", "1120054", "1120055", "1120060", "1120061", "1120062",
"1120065", "1120066", "1120067", "1120068", "1120069", "1120070",
"1120071", "1120073", "1120074", "1120075", "1120076", "1120077",
"1120078", "1120079", "1120080", "1120081", "1120082", "1120083",
"1120084", "1120085", "1120086", "1120087", "1120088", "1120089",
"1120090", "1120091", "1120092", "1120094", "1120095", "1120096",
"113006A", "122013A", "125013A", "126001A", "1260122", "141010A"
), class = "factor"), SITE.NAME = structure(c(8L, 5L, 8L, 2L,
2L, 5L, 4L, 4L, 4L, 3L, 4L, 3L, 4L, 4L, 2L, 4L, 5L, 4L, 4L, 5L,
3L, 5L, 4L, 3L, 4L, 3L, 4L, 2L, 5L, 2L, 2L, 2L, 2L, 4L, 4L, 7L,
8L, 2L, 7L, 2L, 5L, 2L, 7L, 3L, 3L, 3L, 7L, 5L, 3L, 7L, 2L, 3L,
6L, 7L, 7L, 7L, 7L, 6L, 2L, 2L, 7L, 3L, 3L, 3L, 3L, 2L, 3L, 8L,
7L, 7L, 3L, 7L, 3L, 3L, 7L, 3L, 7L, 4L, 5L, 3L, 7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L, 6L, 8L, 1L,
1L, 1L, 1L, 8L, 6L, 6L, 8L, 1L, 8L, 6L, 6L, 6L, 6L, 6L, 6L, 1L,
1L, 1L, 1L, 1L, 8L), .Label = c("Coochin Creek at Mawsons Road",
"Johnstone River at Coquette Point Gbr_Jri_Wq", "Mulgrave River at Deeral",
"Pioneer River at Dumbleton Weir Headwater", "Plane Creek at Sucrogen Weir",
"Proserpine River at Glen Isla", "Russell River at East Russell",
"Sandy Creek at Homebush", "Tully River at Euramo"), class = "factor"),
Date = structure(c(64L, 62L, 48L, 63L, 42L, 8L, 54L, 75L,
75L, 48L, 12L, 73L, 3L, 37L, 40L, 17L, 69L, 69L, 47L, 4L,
27L, 4L, 48L, 64L, 74L, 79L, 74L, 79L, 54L, 49L, 40L, 80L,
61L, 62L, 64L, 53L, 3L, 80L, 53L, 4L, 81L, 45L, 53L, 53L,
50L, 53L, 50L, 31L, 50L, 50L, 81L, 53L, 17L, 53L, 50L, 70L,
46L, 43L, 4L, 6L, 70L, 53L, 13L, 65L, 13L, 2L, 56L, 37L,
25L, 53L, 65L, 68L, 56L, 46L, 2L, 70L, 13L, 12L, 81L, 40L,
6L, 24L, 16L, 16L, 46L, 68L, 2L, 80L, 52L, 68L, 81L, 81L,
14L, 46L, 30L, 60L, 30L, 70L, 56L, 45L, 61L, 16L, 65L, 56L,
16L, 81L, 55L, 5L, 32L, 10L, 13L, 13L, 46L, 72L, 32L, 49L,
14L, 4L, 8L, 42L, 35L, 1L, 41L, 37L, 81L, 63L, 52L, 76L,
1L, 32L, 53L, 40L, 55L, 52L, 58L, 53L, 10L, 53L, 20L, 48L,
80L, 19L, 49L, 13L, 56L, 53L, 19L, 50L, 21L, 46L, 35L, 21L,
19L, 45L, 16L, 64L, 81L, 19L, 32L, 25L, 52L, 72L, 38L, 49L,
49L, 26L, 38L, 38L, 38L, 32L, 80L, 16L, 56L, 46L, 50L, 1L,
32L, 41L, 41L, 32L, 58L, 58L, 41L, 56L, 13L, 23L, 68L, 55L,
49L, 32L, 15L, 5L, 55L, 2L, 40L, 65L, 65L, 53L, 58L, 25L,
13L, 5L, 37L, 61L, 11L, 35L, 65L, 60L, 11L, 1L, 52L, 45L,
58L, 52L, 6L, 56L, 49L, 68L, 13L, 68L, 35L, 49L, 55L, 49L,
45L, 30L, 55L, 19L, 8L, 67L, 22L, 70L, 5L, 52L, 45L, 34L,
49L, 45L, 32L, 80L, 16L, 13L, 70L, 49L, 67L, 16L, 19L, 44L,
67L, 42L, 21L, 21L, 80L, 1L, 45L, 45L, 59L, 4L, 59L, 29L,
29L, 21L, 45L, 71L, 45L, 45L, 80L, 4L, 40L, 40L, 8L, 4L,
15L, 81L, 18L, 18L, 15L, 20L, 54L, 81L, 12L, 76L, 57L, 18L,
12L, 81L, 20L, 80L, 80L, 15L, 81L, 81L, 31L, 20L, 8L, 28L,
18L, 20L, 18L, 20L, 80L, 4L, 47L, 69L, 18L, 18L, 62L, 18L,
20L, 10L, 4L, 10L, 4L, 9L, 10L, 12L, 18L, 28L, 9L, 8L, 18L,
18L, 9L, 12L, 8L, 9L, 4L, 28L, 4L, 8L, 8L, 8L, 8L, 10L, 8L,
66L, 39L, 8L, 20L, 77L, 36L, 36L, 36L, 20L, 4L, 74L, 12L,
51L, 20L, 4L, 78L, 78L, 81L, 81L, 4L, 7L, 7L, 7L, 7L, 33L,
12L), .Label = c("1/01/2019", "1/02/2019", "1/11/2018", "10/12/2018",
"11/02/2019", "11/03/2019", "11/04/2019", "11/12/2018", "12/12/2018",
"13/12/2018", "14/01/2019", "14/12/2018", "15/01/2019", "15/11/2018",
"15/12/2018", "16/01/2019", "16/11/2018", "16/12/2018", "17/01/2019",
"17/12/2018", "18/01/2019", "18/02/2019", "18/03/2019", "18/09/2018",
"19/01/2019", "19/02/2019", "19/11/2018", "19/12/2018", "2/01/2019",
"2/02/2019", "2/11/2018", "20/01/2019", "20/04/2019", "20/12/2018",
"21/01/2019", "21/04/2019", "22/11/2018", "24/01/2019", "24/04/2019",
"24/12/2018", "25/01/2019", "25/02/2019", "25/09/2018", "25/10/2018",
"25/12/2018", "26/01/2019", "26/09/2018", "26/11/2018", "26/12/2018",
"27/01/2019", "27/03/2019", "27/12/2018", "28/01/2019", "28/08/2018",
"28/12/2018", "29/01/2019", "29/11/2018", "29/12/2018", "3/01/2019",
"3/02/2019", "3/03/2019", "3/07/2018", "3/09/2018", "3/12/2018",
"30/01/2019", "30/11/2018", "30/12/2018", "31/01/2019", "31/07/2018",
"31/12/2018", "4/01/2019", "4/02/2019", "5/11/2018", "5/12/2018",
"6/12/2018", "7/01/2019", "7/03/2019", "7/12/2018", "8/10/2018",
"8/12/2018", "9/12/2018"), class = "factor"), Trios.nitrate..mg.L. = c(0.01,
0.01, 0.01, 0.01, 0.02, 0.02, 0.02, 0.02, 0.02, 0.03, 0.03,
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.04, 0.04, 0.04, 0.04,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.06, 0.06,
0.07, 0.07, 0.07, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.09,
0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.1, 0.1, 0.1, 0.1, 0.1,
0.1, 0.1, 0.1, 0.1, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11,
0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.12, 0.12, 0.12, 0.12,
0.12, 0.12, 0.12, 0.12, 0.12, 0.13, 0.13, 0.13, 0.13, 0.13,
0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13,
0.13, 0.13, 0.13, 0.13, 0.13, 0.14, 0.14, 0.14, 0.14, 0.14,
0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14,
0.14, 0.14, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15,
0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.16, 0.16, 0.16,
0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.17,
0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.18, 0.18, 0.18,
0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.19, 0.19,
0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19,
0.19, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2,
0.2, 0.2, 0.2, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21,
0.21, 0.21, 0.21, 0.21, 0.21, 0.22, 0.22, 0.22, 0.22, 0.22,
0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22,
0.22, 0.22, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23,
0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23,
0.23, 0.23, 0.24, 0.24, 0.24, 0.24, 0.24, 0.24, 0.24, 0.24,
0.24, 0.24, 0.24, 0.25, 0.25, 0.25, 0.26, 0.26, 0.26, 0.26,
0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.27,
0.27, 0.27, 0.28, 0.28, 0.3, 0.3, 0.3, 0.31, 0.31, 0.31,
0.31, 0.31, 0.32, 0.32, 0.33, 0.34, 0.34, 0.34, 0.35, 0.35,
0.36, 0.36, 0.37, 0.37, 0.37, 0.38, 0.38, 0.38, 0.38, 0.38,
0.39, 0.39, 0.4, 0.42, 0.42, 0.42, 0.43, 0.44, 0.48, 0.49,
0.49, 0.51, 0.51, 0.53, 0.56, 0.57, 0.58, 0.58, 0.58, 0.58,
0.58, 0.61, 0.64, 0.73, 0.76, 0.76, 0.81, 0.82, 0.85, 0.85,
0.85, 0.86, 0.88, 0.92, 0.94, 0.96, 1, 1.04, 1.04, 1.06,
1.14, 1.18, 1.34, 1.37, 1.45, 1.48, 1.48, 1.48, 1.54, 1.58,
1.73, 1.76, 1.82, 1.85, 1.95, 1.95, 1.96, 2.15, 2.18, 2.26,
2.3, 2.3, 2.3, 2.3, 2.69, 3.12), Chem.centre.Nox..mg.L. = c(5e-04,
0.001, 0.086, 0.048, 0.036, 0.015, 0.001, 0.088, 0.305, 0.012,
0.078, 0.023, 0.047, 0.002, 0.08, 0.004, 0.002, 0.003, 0.002,
0.029, 0.009, 0.045, 0.062, 0.006, 0.149, 0.087, 0.311, 0.008,
5e-04, 0.152, 0.03, 0.339, 0.103, 0.048, 0.003, 0.039, 0.159,
0.156, 0.043, 0.209, 0.091, 0.135, 0.039, 0.042, 0.041, 0.049,
0.045, 0.021, 0.045, 0.044, 0.235, 0.051, 0.03, 0.063, 0.046,
0.075, 0.058, 0.303, 0.227, 0.092, 0.094, 0.066, 0.068, 0.055,
0.073, 0.186, 0.079, 5e-04, 0.073, 0.086, 0.074, 0.097, 0.083,
0.062, 0.086, 0.084, 0.088, 0.098, 0.033, 0.093, 0.122, 0.104,
0.09, 0.093, 0.078, 0.095, 0.086, 0.178, 0.155, 0.098, 0.123,
0.134, 0.005, 0.065, 0.105, 0.109, 0.175, 0.098, 0.093, 0.081,
0.116, 0.116, 0.097, 0.098, 0.114, 0.159, 0.083, 0.126, 0.119,
0.092, 0.104, 0.116, 0.093, 0.114, 0.12, 0.118, 5e-04, 0.185,
0.265, 0.14, 0.168, 0.133, 0.116, 0.006, 0.057, 0.149, 0.086,
0.143, 0.137, 0.134, 0.164, 0.237, 0.114, 0.106, 0.123, 0.121,
0.086, 0.117, 0.184, 5e-04, 0.198, 0.148, 0.103, 0.159, 0.128,
0.134, 0.156, 0.134, 0.172, 0.082, 0.168, 0.176, 0.168, 0.153,
0.167, 0.001, 0.162, 0.171, 0.165, 0.152, 0.156, 0.17, 0.126,
0.124, 0.105, 0.188, 0.159, 0.17, 0.147, 0.174, 0.099, 0.176,
0.15, 0.141, 0.213, 0.166, 0.173, 0.181, 0.188, 0.192, 0.156,
0.062, 0.157, 0.167, 0.149, 0.234, 0.13, 0.172, 0.154, 0.194,
0.389, 0.171, 0.163, 0.181, 0.2, 0.156, 0.186, 0.17, 0.19,
0.196, 0.156, 0.218, 0.298, 0.218, 0.184, 0.206, 0.154, 0.193,
0.18, 0.192, 0.192, 0.145, 0.196, 0.158, 0.23, 0.172, 0.171,
0.154, 0.162, 0.209, 0.215, 0.179, 0.196, 0.183, 0.161, 0.208,
0.194, 0.208, 0.22, 0.178, 0.274, 0.184, 0.214, 0.222, 0.144,
0.169, 0.168, 0.183, 0.223, 0.184, 0.195, 0.181, 0.2, 0.202,
0.218, 0.191, 0.223, 0.057, 0.206, 0.237, 0.231, 0.244, 0.295,
0.217, 0.153, 0.214, 0.256, 0.17, 0.246, 0.25, 0.232, 0.247,
0.168, 0.247, 0.156, 0.214, 0.196, 0.183, 0.24, 0.205, 0.519,
0.197, 0.119, 0.306, 0.143, 0.257, 0.118, 0.269, 0.352, 0.256,
0.13, 0.307, 0.066, 0.272, 0.19, 0.261, 0.172, 0.222, 0.232,
0.236, 0.29, 0.276, 0.316, 0.217, 0.257, 0.206, 0.247, 0.28,
0.322, 0.304, 0.412, 0.36, 0.377, 0.421, 0.326, 0.33, 0.464,
0.331, 0.212, 0.456, 0.434, 0.486, 0.253, 0.48, 0.337, 0.549,
0.45, 0.611, 0.579, 0.594, 0.613, 0.672, 0.663, 0.389, 0.694,
0.718, 0.71, 0.692, 0.754, 0.816, 0.77, 0.863, 0.878, 0.388,
0.914, 0.42, 0.918, 1.06, 0.859, 1.58, 1.39, 0.922, 0.633,
1.22, 1.31, 0.399, 1.46, 1.71, 1.51, 1.58, 0.271, 0.44, 4.24,
3.65, 2.06, 2.61, 5e-04, 0.001, 0.065, 1.38, 2.91)), class = "data.frame", row.names = c(NA,
-361L))
>
The input file (Nitrate_set) includes 9 study sites. I have been able to produce a correlation plot between two variables of interest consecutively for each site within a loop, but am unable to add to appropriate site name as a header for each plot. Here's an example of the data:
SITE.NAME COR
1 Coochin Creek at Mawsons Road -0.1122249
2 Johnstone River at Coquette Point Gbr_Jri_Wq 0.3614868
3 Mulgrave River at Deeral 0.9338604
4 Pioneer River at Dumbleton Weir Headwater 0.7270477
5 Plane Creek at Sucrogen Weir 0.8337472
6 Proserpine River at Glen Isla 0.6695578
7 Russell River at East Russell 0.9879924
8 Sandy Creek at Homebush 0.9756037
9 Tully River at Euramo 0.9751152
I would like each correlation plot to display a header appropriate to it's site name. I'm not sure where to put that code within the loop.
This is the first time I am trying to produce plots within a loop and I'm a novice coder. I don't know what to try next..
#Creating function func to calculate correlation for single site
func <- function(Nitrate_set){ return(data.frame(COR = cor(Nitrate_set$Trios.nitrate..mg.L., Nitrate_set$Chem.centre.Nox..mg.L.))) }
#Calling func Function for each site name and storing the results in cor_result. cor_result will show correlation for each site as a list.
cor_result <- ddply(Nitrate_set, .(SITE.NAME), func)
cor_result
#Creating function to display correlation plot for every site
funcPlot <- function(Nitrate_set){
chart.Correlation(Nitrate_set[,c(4,5)], histogram=TRUE, pch=19)
}
#Calling the function to display the plots. This will return nine plots serially. At this point we need to title site name for each site.
ddply(Nitrate_set, .(SITE.NAME), funcPlot)
I expect each plot to be displayed with a header but am unable to work out how and where to put that section of code within the loop
Starting R with a bare-bone
l#np350v5c:~$ R --vanilla
> search()
[1] ".GlobalEnv" "package:stats" "package:graphics"
[4] "package:grDevices" "package:utils" "package:datasets"
[7] "package:methods" "Autoloads" "package:base"
.. this is a dump of data (emergency accesses hours in a northern Italy hospital) which gave a strange (to me) behaviour:
times <- structure(list(sec = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0), min = c(5L, 43L, 2L, 47L, 15L, 18L, 46L, 50L, 58L,
26L, 14L, 54L, 28L, 11L, 32L, 17L, 51L, 40L, 17L, 47L, 21L, 57L,
59L, 34L, 45L, 15L, 10L, 25L, 27L, 31L, 5L, 34L, 5L, 36L, 16L,
2L, 20L, 0L, 24L, 1L, 54L, 59L, 28L, 24L, 24L, 19L, 26L, 1L,
48L, 0L, 10L, 18L, 43L, 38L, 24L, 21L, 37L, 36L, 54L, 11L, 27L,
29L, 34L, 32L, 33L, 43L, 40L, 53L, 56L, 48L, 47L, 54L, 11L, 37L,
14L, 46L, 30L, 54L, 0L, 38L, 27L, 57L, 21L, 31L, 21L, 37L, 17L,
41L, 21L, 14L, 33L, 33L, 31L, 6L, 30L, 48L, 49L, 26L, 9L, 0L,
19L, 45L, 5L, 9L, 29L, 15L, 34L, 48L, 20L, 25L, 1L, 49L, 48L,
46L, 47L, 18L, 48L, 35L, 56L, 24L, 41L, 13L, 37L, 53L, 57L, 11L,
9L, 43L, 30L, 11L, 55L, 56L, 12L, 35L, 14L, 48L, 22L, 44L, 25L,
51L, 51L, 27L, 58L, 23L, 17L, 42L, 21L, 54L, 59L, 40L, 37L, 43L,
15L, 12L, 22L, 15L, 55L, 7L, 21L, 59L, 34L, 38L, 15L, 8L, 57L,
49L, 6L, 1L, 51L, 46L, 49L, 20L, 46L, 56L, 32L, 36L, 56L, 47L,
58L, 23L, 14L, 56L, 4L, 44L, 25L, 44L, 22L, 21L, 36L, 35L, 58L,
27L, 22L, 44L, 16L, 5L, 34L, 46L, 52L, 18L, 0L, 32L, 49L, 3L,
16L, 53L, 57L, 58L, 35L, 21L, 32L, 57L, 7L, 20L, 29L, 26L, 48L,
53L, 9L, 59L, 58L, 30L, 57L, 34L, 6L, 29L, 57L, 10L, 25L, 15L,
26L, 29L, 20L, 24L, 36L, 54L, 46L, 24L, 14L, 10L, 48L, 22L, 17L,
39L, 59L, 33L, 12L, 0L, 29L, 36L, 31L, 57L, 38L, 10L, 29L, 42L,
36L, 16L, 2L, 21L, 35L, 4L, 16L, 33L, 35L, 14L, 37L, 25L, 51L,
12L, 45L, 15L, 7L, 33L, 42L, 28L, 19L, 40L, 5L, 39L, 13L, 23L,
47L, 31L, 7L, 12L, 8L, 7L, 24L, 37L, 51L, 49L, 11L, 0L, 23L,
30L, 37L, 48L, 26L, 42L, 33L, 8L, 17L, 4L, 51L, 26L, 48L, 17L,
43L, 35L, 35L, 27L, 27L, 47L, 17L, 24L, 43L, 55L, 20L, 54L, 38L,
58L, 2L, 37L, 26L, 3L, 25L, 18L, 0L, 58L, 57L, 12L, 10L, 51L,
37L, 23L, 57L, 14L, 7L, 22L, 50L, 14L, 24L, 27L, 42L, 53L, 6L,
21L, 56L, 17L, 4L, 6L, 30L, 47L, 42L, 20L, 17L, 0L, 35L, 59L,
46L, 50L, 16L, 15L, 42L, 26L, 36L, 8L, 35L, 2L, 59L, 12L, 14L,
58L, 3L, 0L, 37L, 36L, 23L, 29L, 45L, 44L, 32L, 25L, 1L, 50L,
17L, 56L, 58L, 53L, 35L, 17L, 14L, 38L, 27L, 27L, 8L, 14L, 7L,
24L, 13L, 42L, 21L, 12L, 38L, 24L, 30L, 27L, 55L, 23L, 31L, 43L,
22L, 47L, 50L, 27L, 56L, 22L, 54L, 23L, 46L, 17L, 30L, 41L, 54L,
41L, 51L, 44L, 34L, 42L, 3L, 57L, 9L, 51L, 54L, 58L, 53L, 58L,
4L, 12L, 12L, 35L, 55L, 5L, 4L, 15L, 56L, 14L, 48L, 57L, 13L,
19L, 25L, 24L, 24L, 2L, 54L), hour = c(-3, -4, -3, -2, -4, -1,
-5, -4, -5, -5, -5, -4, -3, -2, -4, -2, -2, -4, -4, -1, -2, -5,
-5, -2, -2, -2, -5, -1, -1, -4, -3, -4, -4, -3, -4, -3, -1, -2,
-2, -1, -2, -5, -5, -3, -2, -2, -3, -3, -4, -1, -4, -3, -4, -2,
-5, -2, -4, -5, -4, -2, -5, -1, -5, -3, -2, -1, -3, -5, -1, -3,
-5, -1, -5, -1, -3, -1, -2, -5, -3, -1, -5, -1, -1, -3, -5, -1,
-2, -4, -4, -5, -3, -5, -4, -1, -5, -2, -5, -3, -5, -5, -2, -1,
-5, -3, -5, -3, -2, -4, -3, -1, -1, -2, -3, -1, -4, -3, -4, -5,
-1, -5, -3, -3, -1, -3, -3, -4, -4, -2, -5, -5, -1, -3, -5, -2,
-3, -2, -1, -5, -3, -5, -1, -1, -1, -3, -3, -5, -1, -2, -4, -2,
-4, -1, -4, -5, -1, -5, -1, -1, -4, -2, -5, -5, -3, -1, -5, -3,
-4, -5, -4, -5, -3, -5, -5, -5, -2, -5, -3, -5, -3, -4, -4, -5,
-5, -1, -4, -4, -1, -3, -1, -3, -3, -4, -2, -2, -4, -3, -1, -4,
-5, -3, -1, -3, -4, -3, -5, -1, -3, -5, -4, -5, -2, -4, -1, -3,
-5, -2, -5, -3, -4, -2, -5, -4, -1, -5, -3, -5, -1, -2, -2, -4,
-3, -4, -2, -4, -3, -4, -2, -5, -1, -1, -2, -1, -3, -5, -1, -1,
-2, -4, -4, -5, -3, -3, -3, -4, -4, -4, -4, -3, -4, -2, -5, -4,
-1, -4, -5, -4, -3, -3, -5, -2, -3, -1, -4, -1, -5, -2, -1, -1,
-4, -3, -2, -5, -4, -3, -4, -1, -3, -4, -5, -3, -2, -4, -1, -4,
-4, -2, -5, -3, -5, -1, -3, -4, -2, -1, -2, -3, -5, -3, -1, -1,
-3, -4, -4, -2, -2, -1, -2, -1, -4, -2, -5, -2, -1, -3, -5, -1,
-5, -3, -3, -5, -2, -1, -1, -4, -5, -5, -4, -1, -3, -5, -2, -4,
-1, -2, -4, -5, -5, -1, -5, -5, -4, -2, -5, -2, -3, -2, -2, -2,
-3, -2, -4, -4, -5, -1, -2, -5, -3, -1, -1, -4, -1, -5, -3, -5,
-4, -2, -4, -3, -4, -4, -3, -2, -2, -5, -2, -1, -1, -1, -3, -5,
-4, -5, -1, -1, -3, -2, -4, -2, -2, -1, -2, -4, -3, -5, -2, -1,
-4, -4, -1, -4, -2, -3, -2, -1, -5, -5, -4, -2, -1, -5, -3, -3,
-4, -5, -3, -4, -1, -3, -2, -2, -2, -4, -1, -2, -2, -2, -5, -1,
-4, -2, -4, -2, -5, -4, -2, -3, -2, -1, -1, -1, -3, -2, -5, -3,
-5, -2, -1), mday = c(24L, 30L, 13L, 17L, 11L, 17L, 1L, 26L,
21L, 1L, 9L, 6L, 7L, 17L, 17L, 4L, 24L, 23L, 31L, 2L, 22L, 19L,
12L, 17L, 26L, 13L, 12L, 26L, 14L, 20L, 22L, 14L, 26L, 29L, 7L,
16L, 19L, 10L, 19L, 17L, 15L, 22L, 4L, 22L, 6L, 22L, 6L, 24L,
18L, 11L, 13L, 26L, 5L, 2L, 1L, 12L, 15L, 21L, 22L, 24L, 25L,
18L, 4L, 18L, 28L, 4L, 21L, 25L, 18L, 4L, 8L, 10L, 21L, 11L,
11L, 20L, 23L, 14L, 16L, 2L, 31L, 3L, 21L, 3L, 1L, 13L, 26L,
20L, 17L, 4L, 3L, 13L, 10L, 23L, 16L, 1L, 28L, 27L, 16L, 29L,
6L, 15L, 6L, 14L, 4L, 17L, 15L, 4L, 19L, 26L, 20L, 22L, 24L,
1L, 16L, 18L, 12L, 21L, 26L, 11L, 30L, 19L, 26L, 4L, 3L, 2L,
26L, 30L, 14L, 16L, 21L, 20L, 29L, 26L, 17L, 23L, 8L, 19L, 23L,
14L, 14L, 5L, 28L, 6L, 15L, 13L, 8L, 6L, 1L, 2L, 3L, 5L, 16L,
17L, 3L, 23L, 20L, 27L, 28L, 1L, 31L, 26L, 14L, 30L, 22L, 9L,
31L, 5L, 19L, 9L, 27L, 26L, 24L, 12L, 27L, 20L, 9L, 4L, 9L, 4L,
18L, 9L, 13L, 10L, 23L, 27L, 11L, 21L, 6L, 6L, 6L, 9L, 23L, 14L,
27L, 23L, 17L, 19L, 29L, 16L, 18L, 4L, 5L, 29L, 14L, 16L, 19L,
25L, 14L, 16L, 27L, 12L, 11L, 26L, 2L, 17L, 1L, 20L, 2L, 3L,
5L, 7L, 27L, 27L, 17L, 6L, 4L, 11L, 5L, 15L, 13L, 19L, 1L, 29L,
18L, 29L, 17L, 23L, 31L, 26L, 19L, 17L, 14L, 21L, 17L, 13L, 5L,
13L, 4L, 27L, 13L, 18L, 4L, 24L, 23L, 21L, 25L, 25L, 2L, 24L,
25L, 28L, 6L, 10L, 15L, 9L, 7L, 8L, 9L, 22L, 17L, 11L, 15L, 24L,
14L, 23L, 18L, 28L, 3L, 20L, 25L, 5L, 17L, 21L, 24L, 21L, 24L,
3L, 31L, 21L, 18L, 27L, 30L, 25L, 13L, 8L, 21L, 16L, 22L, 24L,
3L, 16L, 4L, 22L, 15L, 30L, 2L, 16L, 28L, 24L, 26L, 20L, 9L,
3L, 3L, 4L, 11L, 5L, 30L, 19L, 24L, 3L, 24L, 5L, 14L, 4L, 23L,
18L, 7L, 16L, 24L, 3L, 27L, 4L, 30L, 22L, 28L, 17L, 25L, 3L,
19L, 18L, 26L, 8L, 24L, 18L, 17L, 6L, 17L, 25L, 6L, 23L, 14L,
4L, 5L, 15L, 5L, 4L, 19L, 4L, 7L, 24L, 28L, 23L, 28L, 9L, 7L,
27L, 26L, 25L, 4L, 19L, 24L, 18L, 18L, 7L, 16L, 11L, 10L, 21L,
6L, 30L, 15L, 1L, 16L, 16L, 21L, 17L, 8L, 19L, 1L, 23L, 10L,
18L, 2L, 8L, 20L, 28L, 25L, 28L, 25L, 23L, 5L, 4L, 31L, 2L, 21L,
30L, 1L, 4L, 18L, 8L, 25L, 1L, 25L, 2L, 5L, 20L, 2L, 17L, 5L,
5L, 30L, 30L, 17L, 5L, 18L, 21L, 24L, 20L, 26L, 31L, 15L, 30L,
16L, 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4L, 1L, 0L, 1L, 0L, 11L, 2L, 6L, 9L,
11L, 11L, 10L, 11L, 7L, 8L, 4L, 6L, 9L, 4L, 8L, 9L, 9L, 10L,
10L, 3L, 7L, 9L, 4L, 8L, 2L, 10L, 10L, 4L, 3L, 1L, 9L, 7L, 9L,
3L, 5L, 0L, 8L, 9L, 7L, 8L, 5L, 7L, 8L, 8L, 10L, 1L, 7L, 2L,
9L, 8L, 2L, 5L, 0L, 10L, 5L, 6L, 2L, 10L, 1L, 8L, 7L, 0L, 1L,
3L, 9L, 3L, 6L, 4L, 10L, 0L, 3L, 5L, 4L, 10L, 9L, 7L, 4L, 3L,
0L, 3L, 3L, 1L, 9L, 5L, 3L, 3L, 8L, 11L, 10L, 4L, 11L, 0L, 7L,
1L, 0L, 4L, 2L, 2L, 0L, 0L, 7L, 4L, 4L, 10L, 8L, 3L, 8L, 11L,
8L, 0L, 0L, 6L, 6L, 1L, 0L, 3L, 4L, 2L, 9L, 1L, 6L, 4L, 3L, 1L,
0L, 0L, 11L, 1L, 4L, 3L, 7L, 10L, 2L, 1L, 0L, 0L, 5L, 4L, 8L,
10L, 7L, 10L, 8L, 8L, 1L, 8L, 11L, 8L, 10L, 7L, 11L, 4L, 8L,
1L, 10L, 3L, 10L, 5L, 10L, 7L, 9L, 9L, 2L, 10L, 0L, 9L, 4L, 7L,
7L, 11L, 1L, 11L, 1L, 1L, 4L, 2L, 3L, 3L, 5L, 10L, 0L, 7L, 9L,
7L, 10L, 10L, 4L, 2L, 0L, 0L, 1L, 7L, 8L, 6L, 9L, 9L, 11L, 4L,
6L, 8L, 9L, 0L, 8L, 6L, 4L, 6L, 7L, 4L, 0L, 0L, 9L, 1L, 4L, 0L,
1L, 8L, 1L, 3L, 7L), year = c(112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L,
112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L, 112L
), wday = c(6L, 3L, 1L, 5L, 5L, 6L, 6L, 2L, 4L, 5L, 4L, 3L, 3L,
3L, 5L, 3L, 5L, 4L, 2L, 6L, 3L, 1L, 4L, 4L, 6L, 5L, 3L, 1L, 5L,
5L, 0L, 2L, 2L, 0L, 5L, 0L, 6L, 0L, 1L, 1L, 0L, 2L, 6L, 3L, 4L,
0L, 2L, 1L, 3L, 6L, 0L, 4L, 5L, 1L, 2L, 1L, 0L, 0L, 5L, 5L, 2L,
6L, 3L, 3L, 1L, 3L, 5L, 2L, 6L, 5L, 6L, 3L, 4L, 5L, 3L, 5L, 4L,
6L, 4L, 5L, 1L, 4L, 2L, 5L, 1L, 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0L, 3L, 0L, 1L, 2L, 1L, 5L, 2L,
3L, 5L, 4L, 6L, 3L, 6L, 4L, 5L, 6L, 4L, 5L, 6L, 5L, 6L, 1L, 5L,
4L, 1L, 5L, 0L, 0L, 0L, 0L, 2L, 3L, 1L, 1L, 0L, 0L, 5L, 3L, 4L,
0L, 3L, 6L, 0L, 0L, 3L, 5L, 6L, 6L, 6L, 4L, 6L, 3L, 5L, 5L, 2L,
2L, 4L, 0L, 0L, 5L, 4L, 4L, 4L, 4L, 2L, 0L, 3L, 2L, 6L, 3L, 5L,
4L, 3L, 1L, 2L, 2L, 1L, 5L, 5L, 0L, 5L, 5L, 4L, 1L, 3L, 6L, 5L,
1L, 3L, 2L, 1L, 2L, 0L, 0L, 3L, 5L, 0L, 3L, 1L, 6L, 3L, 1L, 3L,
5L, 3L, 5L, 5L, 5L, 6L, 4L, 0L, 3L, 2L, 0L, 3L), yday = c(328L,
150L, 225L, 229L, 131L, 321L, 335L, 177L, 172L, 152L, 39L, 157L,
311L, 290L, 47L, 185L, 236L, 235L, 30L, 153L, 234L, 323L, 193L,
137L, 146L, 194L, 346L, 330L, 257L, 110L, 203L, 44L, 177L, 210L,
341L, 259L, 139L, 161L, 78L, 260L, 14L, 142L, 34L, 52L, 340L,
21L, 65L, 358L, 199L, 41L, 133L, 207L, 278L, 183L, 121L, 316L,
14L, 294L, 173L, 54L, 268L, 48L, 185L, 199L, 148L, 94L, 264L,
359L, 230L, 124L, 342L, 283L, 172L, 131L, 192L, 19L, 235L, 13L,
46L, 306L, 365L, 123L, 233L, 215L, 274L, 286L, 299L, 324L, 107L,
34L, 276L, 103L, 161L, 357L, 197L, 305L, 332L, 26L, 350L, 119L,
279L, 319L, 187L, 257L, 155L, 229L, 227L, 247L, 49L, 299L, 79L,
356L, 54L, 182L, 228L, 322L, 71L, 264L, 269L, 254L, 273L, 139L,
56L, 3L, 2L, 153L, 207L, 211L, 104L, 167L, 233L, 232L, 363L,
207L, 47L, 266L, 312L, 292L, 82L, 318L, 318L, 4L, 118L, 279L,
288L, 225L, 220L, 36L, 274L, 61L, 62L, 4L, 228L, 16L, 215L, 327L,
232L, 178L, 240L, 152L, 243L, 360L, 134L, 334L, 234L, 343L, 212L,
339L, 323L, 190L, 86L, 207L, 23L, 224L, 331L, 79L, 282L, 124L,
39L, 63L, 230L, 252L, 103L, 314L, 327L, 270L, 10L, 294L, 96L,
340L, 187L, 343L, 174L, 73L, 270L, 82L, 351L, 353L, 59L, 259L,
48L, 185L, 248L, 149L, 134L, 106L, 49L, 55L, 257L, 320L, 239L,
102L, 254L, 177L, 122L, 47L, 213L, 232L, 183L, 62L, 186L, 280L,
208L, 361L, 260L, 187L, 308L, 70L, 35L, 227L, 194L, 323L, 152L,
149L, 48L, 28L, 47L, 22L, 365L, 85L, 200L, 290L, 348L, 355L,
321L, 347L, 217L, 256L, 124L, 208L, 286L, 138L, 247L, 297L, 296L,
325L, 329L, 115L, 214L, 297L, 145L, 271L, 65L, 314L, 319L, 129L,
97L, 38L, 282L, 234L, 290L, 101L, 166L, 23L, 257L, 296L, 230L,
271L, 154L, 232L, 268L, 248L, 321L, 51L, 236L, 80L, 297L, 246L,
90L, 172L, 17L, 331L, 181L, 206L, 72L, 312L, 51L, 259L, 234L,
23L, 33L, 106L, 277L, 112L, 196L, 150L, 306L, 15L, 118L, 175L,
146L, 324L, 282L, 215L, 123L, 94L, 10L, 95L, 120L, 49L, 297L,
154L, 114L, 95L, 257L, 338L, 327L, 138L, 341L, 15L, 236L, 33L,
26L, 124L, 89L, 81L, 27L, 16L, 237L, 123L, 139L, 322L, 269L,
98L, 267L, 352L, 260L, 5L, 16L, 206L, 187L, 53L, 13L, 94L, 125L,
74L, 278L, 34L, 200L, 124L, 97L, 54L, 27L, 22L, 362L, 39L, 127L,
117L, 238L, 329L, 63L, 49L, 23L, 17L, 169L, 127L, 259L, 315L,
222L, 325L, 249L, 273L, 45L, 244L, 350L, 259L, 325L, 229L, 342L,
139L, 244L, 53L, 314L, 108L, 306L, 159L, 324L, 240L, 298L, 301L,
84L, 327L, 4L, 277L, 151L, 214L, 233L, 364L, 31L, 338L, 48L,
38L, 145L, 60L, 115L, 92L, 156L, 324L, 1L, 229L, 278L, 217L,
334L, 334L, 137L, 64L, 17L, 20L, 54L, 232L, 269L, 212L, 288L,
303L, 350L, 126L, 199L, 271L, 280L, 24L, 267L, 188L, 143L, 190L,
220L, 145L, 10L, 19L, 292L, 54L, 125L, 4L, 56L, 269L, 37L, 119L,
234L), isdst = c(0L, 1L, 1L, 1L, 1L, 0L, 0L, 1L, 1L, 1L, 0L,
1L, 0L, 1L, 0L, 1L, 1L, 1L, 0L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 0L,
0L, 1L, 1L, 1L, 0L, 1L, 1L, 0L, 1L, 1L, 1L, 0L, 1L, 0L, 1L, 0L,
0L, 0L, 0L, 0L, 0L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 0L, 0L, 1L, 1L,
0L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 0L, 1L, 1L, 1L, 1L,
0L, 1L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 0L, 1L,
1L, 1L, 0L, 1L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L,
1L, 0L, 1L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 0L,
0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 0L, 1L, 0L, 1L, 0L,
0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 0L, 0L, 0L, 1L, 0L, 1L,
0L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 0L, 1L, 0L, 1L, 0L, 0L, 1L, 1L,
1L, 0L, 1L, 0L, 0L, 1L, 1L, 0L, 0L, 1L, 1L, 1L, 0L, 0L, 1L, 0L,
1L, 1L, 0L, 1L, 0L, 1L,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 0L, 1L, 0L, 0L, 1L, 0L, 1L, 1L)), .Names = c("sec",
"min", "hour", "mday", "mon", "year", "wday", "yday", "isdst"
), class = c("POSIXlt", "POSIXt"))
Then, trying to extract hours in different ways
df <- data.frame(times,
with.dollar = times$hour,
with.format = as.numeric(format(times, "%H"))
)
head(df)
and my results are
times with.dollar with.format
1 2012-11-23 21:05:00 -3 21
2 2012-05-29 20:43:00 -4 20
3 2012-08-12 21:02:00 -3 21
4 2012-08-16 22:47:00 -2 22
5 2012-05-10 20:15:00 -4 20
6 2012-11-16 23:18:00 -1 23
Another test (not in a data.frame... simple vectors)
> any(times$hour == as.numeric(format(times, "%H")))
[1] FALSE
With times$hour it seems to be counting hours starting from the next days in some cases (all of the cases here reported).
Could you reproduce that? any idea why?
Looking at ?POSIXlt this could be a bug because not all hours are within 0:23 range.
If so, for the moment it would be safer to use format rather $ for POSIXlt vector
> R.version
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 0.3
year 2014
month 03
day 06
svn rev 65126
language R
version.string R version 3.0.3 (2014-03-06)
nickname Warm Puppy