I need to show the unique Count by Url and then show the Avg, Max, Min time that it took as different columns. Was looking at using either dplyr or sqldf.
here is what I am essentially trying to duplicate
SELECT cs-uri-stem as Url, COUNT(*) as totalRequests,
AVG(time-taken) As avgRequestDuration,
MAX(time-taken) As maxRequestDuration,
MIN(time-taken) As minRequestDuration
FROM '[LOGFILEPATH]'
GROUP BY Url
ORDER By totalRequests DESC
Head of data for reference:
> head(iislog1)
iisdate iistime csUriStem timeTaken
1 2019-05-17 03:05:39 /eACommon/SystemConfigurationService.svc/customBinding 7421
2 2019-05-17 03:07:22 /Services/2015V1/EngService.svc/customBinding 8390
3 2019-05-17 03:16:40 /eACommon/SystemConfigurationService.svc/customBinding 515
4 2019-05-17 03:17:39 /eACommon/SystemConfigurationService.svc/customBinding 505
5 2019-05-17 03:25:22 /Services/2015V1/EngService.svc/customBinding 1385
6 2019-05-17 03:31:16 /eAudIT/Services/SAPv1/EngService.svc/customBinding 1365
structure(list(iisdate = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = "2019-05-17", class = "factor"),
iistime = structure(1:6, .Label = c("03:05:39", "03:07:22",
"03:16:40", "03:17:39", "03:25:22", "03:31:16", "03:44:02",
"04:27:09", "04:27:11", "04:27:19", "04:27:20", "04:27:22",
"04:27:30", "04:27:33", "04:27:36", "04:27:40", "04:27:42",
"04:27:43", "04:27:44", "04:27:45", "04:27:46", "04:27:47",
"04:27:48", "04:27:50", "04:27:51", "04:27:55", "04:27:57",
"04:28:00", "04:28:01", "04:28:02", "04:28:03", "04:28:05",
"04:28:06", "04:28:08", "04:28:10", "04:28:19", "04:28:26",
"04:28:27", "04:28:28", "04:28:29", "04:28:32", "04:28:37",
"04:28:50", "04:28:51", "04:28:53", "04:28:54", "04:28:55",
"04:28:56", "04:28:57", "04:29:00", "04:29:16", "04:29:18",
"04:29:19", "04:29:20", "04:29:21", "04:29:23", "04:29:24",
"04:29:25", "04:29:26", "04:29:29", "04:29:30", "04:29:33",
"04:29:35", "04:29:37", "04:29:38", "04:30:27", "04:30:29",
"04:30:31", "04:30:32", "04:30:40", "04:30:43", "04:30:58",
"04:31:00", "04:31:01", "04:31:02", "04:31:04", "04:31:08",
"04:31:46", "04:31:47", "04:31:48", "04:31:49", "04:31:54",
"04:31:55", "04:31:56", "04:31:58", "04:31:59", "04:32:01",
"04:32:02", "04:32:03", "04:32:04", "04:32:05", "04:32:06",
"04:32:08", "04:32:09", "04:32:11", "04:32:12", "04:32:14",
"04:32:15", "04:32:17", "04:32:20", "04:32:27", "04:32:39",
"04:32:41", "04:32:42", "04:32:45", "04:32:58", "04:33:03",
"04:33:04", "04:33:08", "04:33:10", "04:33:11", "04:33:12",
"04:33:14", "04:33:15", "04:33:17", "04:33:18", "04:33:41",
"04:33:42", "04:33:44", "04:33:49", "04:33:50", "04:33:51",
"04:33:52", "04:33:53", "04:33:55", "04:33:57", "04:33:58",
"04:34:00", "04:34:02", "04:34:04", "04:34:05", "04:34:07",
"04:34:08", "04:34:10", "04:34:12", "04:34:15", "04:34:16",
"04:34:18", "04:34:25", "04:34:28", "04:34:39", "04:34:40",
"04:34:42", "04:34:43", "04:34:46", "04:34:51", "04:34:57",
"04:34:58", "04:35:01", "04:35:02", "04:35:10", "04:35:13",
"04:35:14", "04:35:15", "04:35:16", "04:35:17", "04:35:19",
"04:35:20", "04:35:21", "04:35:22", "04:35:24", "04:35:25",
"04:35:27", "04:35:29", "04:35:30", "04:35:31", "04:35:34",
"04:35:35", "04:35:38", "04:35:40", "04:35:49", "04:36:01",
"04:36:02", "04:36:05", "04:36:26", "04:36:28", "04:36:29",
"04:36:31", "04:36:32", "04:36:33", "04:36:36", "04:36:41",
"04:36:42", "04:36:43", "04:36:44", "04:36:45", "04:36:47",
"04:36:49", "04:36:51", "04:36:53", "04:36:54", "04:36:55",
"04:36:56", "04:36:57", "04:36:58", "04:37:00", "04:37:01",
"04:37:02", "04:37:04", "04:37:07", "04:37:11", "04:37:16",
"04:37:29", "04:37:30", "04:37:31", "04:37:33", "04:37:35",
"04:38:08", "04:38:09", "04:38:17", "04:38:18", "04:38:19",
"04:38:23", "04:38:24", "04:38:25", "04:38:27", "04:38:28",
"04:38:29", "04:38:30", "04:38:31", "04:38:32", "04:38:34",
"04:38:35", "04:38:36", "04:38:41", "04:38:42", "04:38:43",
"04:39:14", "04:39:15", "04:39:16", "04:39:17", "04:39:19",
"04:39:30", "04:39:31", "04:39:44", "04:39:45", "04:39:46",
"04:39:48", "04:39:50", "04:40:00", "04:40:01", "04:40:03",
"04:40:06", "04:40:07", "04:40:08", "04:40:09", "04:40:11",
"04:40:12", "04:40:13", "04:40:14", "04:40:16", "04:40:19",
"04:40:20", "04:40:22", "04:40:24", "05:00:45", "05:07:01",
"05:07:03", "05:07:05", "05:07:35", "05:07:36", "05:07:38",
"05:07:39", "05:07:42", "05:07:44", "05:07:45", "05:07:46",
"05:07:49", "05:08:04", "05:08:05", "05:08:06", "05:08:07",
"05:08:08", "05:08:09", "05:08:10", "05:08:11", "05:08:24",
"05:08:30", "05:08:31", "05:08:37", "05:08:38", "05:08:39",
"05:08:40", "05:08:52", "05:08:58", "05:08:59", "05:09:02",
"05:09:03", "05:11:50", "05:11:52", "05:11:53", "05:11:59",
"05:12:00", "05:12:01", "05:12:02", "05:12:03", "05:12:04",
"05:12:06", "05:12:07", "05:12:08", "05:12:09", "05:12:10",
"05:12:11", "05:13:46", "05:13:47", "05:13:48", "05:13:50",
"05:13:51", "05:13:53", "05:13:55", "05:13:56", "05:13:59",
"05:14:05", "05:14:07", "05:14:08", "05:14:10", "05:14:11",
"05:14:12", "05:14:14", "05:14:16", "05:14:18", "05:14:19",
"05:14:20", "05:14:21", "05:14:22", "05:14:24", "05:14:25",
"05:14:27", "05:14:28", "05:14:29", "05:14:30", "05:14:31",
"05:14:32", "05:14:33", "05:14:34", "05:14:36", "05:14:37",
"05:14:38", "05:14:39", "05:14:40", "05:14:41", "05:14:42",
"05:14:43", "05:14:44", "05:14:45", "05:14:46", "05:14:47",
"05:14:48", "05:14:50", "05:14:51", "05:14:52", "05:14:54",
"05:14:55", "05:14:56", "05:14:57", "05:14:58", "05:14:59",
"05:15:00", "05:15:01", "05:15:02", "05:15:03", "05:15:04",
"05:15:06", "05:15:07", "05:15:08", "05:15:09", "05:15:10",
"05:15:11", "05:15:12", "05:15:13", "05:15:15", "05:15:16",
"05:15:17", "05:15:18", "05:15:19", "05:15:20", "05:15:21",
"05:15:22", "05:15:24", "05:15:25", "05:15:26", "05:15:27",
"05:15:28", "05:15:29", "05:15:31", "05:15:32", "05:15:33",
"05:15:34", "05:15:35", "05:15:36", "05:15:37", "05:15:38",
"05:15:39", "05:15:40", "05:15:41", "05:15:42", "05:15:43",
"05:15:44", "05:15:45", "05:15:46", "05:15:48", "05:15:49",
"05:15:50", "05:15:51", "05:15:52", "05:15:53", "05:15:54",
"05:15:55", "05:15:56", "05:15:57", "05:15:58", "05:15:59",
"05:16:00", "05:16:01", "05:16:03", "05:16:04", "05:16:05",
"05:16:06", "05:16:07", "05:16:09", "05:16:10", "05:16:11",
"05:16:12", "05:16:13", "05:16:14", "05:16:15", "05:16:17",
"05:16:19", "05:16:21", "05:16:22", "05:16:23", "05:16:24",
"05:16:25", "05:16:26", "05:16:28", "05:16:29", "05:16:30",
"05:16:31", "05:16:32", "05:16:34", "05:16:35", "05:16:36",
"05:16:37", "05:16:38", "05:16:39", "05:16:41", "05:16:42",
"05:16:43", "05:16:44", "05:16:45", "05:16:47", "05:16:54",
"05:17:13", "05:17:14", "05:17:15", "05:17:16", "05:17:18",
"05:17:19", "05:17:20", "05:17:21", "05:17:22", "05:17:23",
"05:17:25", "05:21:37", "05:21:39", "05:21:40", "05:21:42",
"05:21:44", "05:21:48", "05:21:54", "05:21:55", "05:21:57",
"05:21:58", "05:21:59", "05:22:00", "05:22:01", "05:22:02",
"05:22:03", "05:22:05", "05:22:06", "05:22:07", "05:22:08",
"05:22:09", "05:22:10", "05:22:11", "05:22:12", "05:22:14",
"05:22:15", "05:22:18", "05:22:21", "05:31:23", "05:31:24",
"05:31:26", "05:31:27", "05:31:28", "05:31:29", "05:31:31",
"05:31:34", "05:31:39", "05:31:57", "05:31:58", "05:31:59",
"05:32:01", "05:32:02", "05:32:03", "05:38:29", "05:38:32",
"05:39:08", "05:39:09", "05:39:10", "05:39:11", "05:39:12",
"05:39:14", "05:39:15", "05:39:28", "05:41:58", "05:42:00",
"05:42:02", "05:42:05", "05:42:07", "05:42:08", "05:42:09",
"05:42:11", "05:42:12", "05:42:13", "05:52:15", "05:52:16",
"05:52:17", "05:52:18", "05:52:20", "05:52:24", "05:52:26",
"05:52:53", "05:53:06", "05:53:08", "05:53:09", "05:55:21",
"05:55:23", "05:55:24", "05:55:25", "05:55:27", "05:55:28",
"05:55:29", "05:55:30", "05:55:31", "05:55:33", "06:17:42",
"06:17:44", "06:17:49", "06:18:03", "06:18:04", "06:18:06",
"06:18:08", "06:18:10", "06:18:11", "06:18:13", "06:18:14",
"06:18:15", "06:18:18", "06:18:19", "06:18:21", "06:18:22",
"06:18:23", "06:18:24", "06:18:25", "06:18:26", "06:18:28",
"06:18:30", "06:18:31", "06:18:33", "06:18:35", "06:18:43",
"06:18:44", "06:18:46", "06:18:48", "06:18:49", "06:18:51",
"06:18:53", "06:18:54", "06:18:55", "06:18:58", "06:19:00",
"06:19:02", "06:19:03", "06:19:04", "06:19:09", "06:19:14",
"06:19:15", "06:19:16", "06:19:18", "06:19:19", "06:19:20",
"06:19:22", "06:19:23", "06:19:25", "06:19:26", "06:19:28",
"06:19:30", "06:19:31", "06:19:32", "06:19:44", "06:19:48",
"06:19:49", "06:19:50", "06:19:51", "06:19:53", "06:19:54",
"06:19:56", "06:19:57", "06:19:58", "06:20:00", "06:20:01",
"06:20:05", "06:20:06", "06:21:02", "06:21:04", "06:21:05",
"06:21:08", "06:21:12", "06:21:29", "06:21:30", "06:21:32",
"06:22:05", "06:22:06", "06:24:45", "06:24:47", "06:24:51",
"06:24:53", "06:24:56", "06:24:57", "06:24:58", "06:25:00",
"06:25:02", "06:25:03", "06:25:04", "06:25:05", "06:25:06",
"06:25:10", "06:25:13", "06:25:15", "06:25:16", "06:25:18",
"06:25:19", "06:25:23", "06:25:27", "06:25:38", "06:25:39",
"06:25:41", "06:27:16", "06:27:17", "06:31:27", "06:31:28",
"06:31:29", "06:31:30", "06:31:32", "06:31:33", "06:31:34",
"06:31:35", "06:31:37", "06:31:38", "06:31:39", "06:31:40",
"06:31:41", "06:31:42", "06:31:43", "06:31:44", "06:31:45",
"06:31:47", "06:31:48", "06:31:49", "06:31:50", "06:31:51",
"06:31:52", "06:31:53", "06:31:54", "06:31:55", "06:31:57",
"06:31:58", "06:31:59", "06:32:00", "06:32:01", "06:32:02",
"06:32:03", "06:32:04", "06:32:05", "06:32:06", "06:32:08",
"06:32:09", "06:32:10", "06:32:11", "06:32:12", "06:32:13",
"06:32:15", "06:37:17", "06:37:19", "06:37:20", "06:37:22",
"06:37:23", "06:37:24", "06:37:26", "06:37:27", "06:37:28",
"06:37:29", "06:37:41", "06:37:42", "06:37:47", "06:37:49",
"06:37:50", "06:37:51", "06:37:52", "06:37:53", "06:37:58",
"06:37:59", "06:40:11", "06:40:13", "06:40:14", "06:40:15",
"06:40:16", "06:40:18", "06:40:19", "06:40:20", "06:40:21",
"06:40:22", "06:40:23", "06:40:24", "06:40:25", "06:40:26",
"06:40:50", "06:40:51", "06:40:52", "06:40:53", "06:40:54",
"06:40:56", "06:40:57", "06:40:59", "06:41:01", "06:41:04",
"06:41:17", "06:41:18", "06:41:40", "06:42:43", "06:42:45",
"06:48:50", "06:48:51", "06:49:10", "06:49:12", "06:49:14",
"06:50:21", "06:50:22", "06:50:31", "06:50:32", "06:50:33",
"06:50:44", "06:50:45", "06:52:37", "06:52:38", "06:52:39",
"06:56:39", "06:56:41", "06:56:43", "06:59:16", "06:59:18",
"06:59:19", "06:59:22", "06:59:23", "06:59:24", "06:59:25",
"06:59:27", "06:59:28", "06:59:29", "06:59:30", "07:02:50",
"07:02:52", "07:02:54", "07:02:55", "07:02:56", "07:02:58",
"07:02:59", "07:03:00", "07:06:52", "07:06:54", "07:06:56",
"07:06:57", "07:06:58", "07:07:00", "07:07:02", "07:07:04",
"07:07:05", "07:07:06", "07:07:07", "07:09:38", "07:09:39",
"07:35:15", "07:35:18", "07:35:20", "07:35:23", "07:35:25",
"07:35:26", "07:35:27", "07:35:28", "07:35:29", "07:35:30",
"07:35:32", "07:35:33", "07:35:35", "07:35:36", "07:35:37",
"07:35:38", "07:35:39", "07:35:40", "07:35:41", "07:36:44",
"07:37:09", "07:37:33", "07:37:58", "07:38:23", "07:46:13",
"08:33:43", "08:33:47", "08:33:50", "08:33:58", "08:34:01",
"08:34:02", "08:34:04", "08:34:05", "08:34:06", "08:34:07",
"08:34:09", "08:34:14", "08:34:15", "08:34:28", "08:34:30",
"08:34:31", "08:34:32", "08:34:33", "08:34:34", "08:34:36",
"08:34:37", "08:34:38", "08:34:39", "08:34:40", "08:34:47",
"08:34:49", "08:34:55", "08:34:56", "08:34:57", "08:34:58",
"08:34:59", "08:35:00", "08:35:05", "08:35:06", "08:35:08",
"08:35:11", "08:35:12", "08:35:13", "08:35:15", "08:35:17",
"08:35:18", "08:35:20", "08:35:21", "08:35:23", "08:35:25",
"08:35:37", "08:35:38", "08:35:39", "08:35:40", "08:35:41",
"08:35:42", "08:35:43", "08:59:09", "08:59:12", "08:59:13",
"08:59:15", "09:00:56", "09:00:57", "09:00:59", "09:01:00",
"09:01:02", "09:01:21", "09:22:31", "09:22:34", "09:22:51",
"09:22:53", "09:22:54", "09:22:55", "09:22:57", "09:22:58",
"09:22:59", "09:23:00", "09:23:01", "09:23:02", "09:23:03",
"09:23:04", "09:23:05", "09:23:06", "09:23:07", "09:23:08",
"09:23:10", "09:23:11", "09:23:12", "09:23:16", "09:23:17",
"09:23:18", "09:23:19", "09:23:24", "09:23:26", "09:23:29",
"09:23:30", "09:23:31", "09:23:32", "09:23:33", "09:23:36",
"09:23:37", "09:23:38", "09:23:43", "09:23:45", "09:23:46",
"09:23:48", "09:23:49", "09:23:50", "09:23:51", "09:23:52",
"09:23:53", "09:23:55", "09:23:56", "09:23:57", "09:23:58",
"09:24:01", "09:24:03", "09:24:04", "09:24:06", "09:24:07",
"09:24:10", "09:24:11", "09:24:13", "09:24:14", "09:24:15",
"09:24:16", "09:24:17", "09:24:18", "09:24:19", "09:24:20",
"09:24:21", "09:24:23", "09:24:24", "09:24:25", "09:24:26",
"09:24:27", "09:24:29", "09:24:30", "09:24:31", "09:24:32",
"09:24:33", "09:24:34", "09:24:35", "09:24:37", "09:24:38",
"09:24:39", "09:24:40", "09:24:41", "09:24:42", "09:24:43",
"09:24:44", "09:24:45", "09:24:46", "09:24:48", "09:24:49",
"09:24:50", "09:24:51", "09:24:52", "09:24:53", "09:24:55",
"09:24:56", "09:24:57", "09:24:58", "09:25:00", "09:25:01",
"09:25:02", "09:25:03", "09:25:04", "09:25:06", "09:25:07",
"09:25:08", "09:25:09", "09:25:10", "09:25:12", "09:25:13",
"09:25:14", "09:25:15", "09:25:16", "09:25:17", "09:25:18",
"09:25:19", "09:25:29", "09:25:32", "09:25:34", "09:25:45",
"09:25:47", "09:25:48", "09:25:50", "09:25:52", "09:25:53",
"09:25:55", "09:25:56", "09:26:01", "09:26:14", "09:26:16",
"09:26:17", "09:26:19", "09:26:21", "09:26:22", "09:26:24",
"09:26:25", "09:26:26", "09:26:29", "09:26:30", "09:26:35",
"09:26:36", "09:26:37", "09:26:39", "09:26:42", "09:26:45",
"09:26:47", "09:26:48", "09:26:53", "09:26:55", "09:26:57",
"09:26:58", "09:26:59", "09:27:01", "09:27:04", "09:27:06",
"09:27:09", "09:27:12", "09:27:13", "09:27:14", "09:27:16",
"09:27:17", "09:27:18", "09:27:19", "09:27:20", "09:27:21",
"09:27:23", "09:27:24", "09:27:25", "09:27:26", "09:27:27",
"09:27:28", "09:27:29", "09:27:30", "09:27:31", "09:27:32",
"09:27:33", "09:27:34", "09:27:35", "09:27:36", "09:27:37",
"09:27:39", "09:27:40", "09:27:41", "09:27:42", "09:27:43",
"09:27:44", "09:27:45", "09:27:46", "09:27:47", "09:27:48",
"09:27:49", "09:27:51", "09:27:52", "09:27:53", "09:27:54",
"09:27:55", "09:27:56", "09:27:57", "09:27:58", "09:28:00",
"09:28:01", "09:28:03", "09:28:04", "09:28:05", "09:28:07",
"09:28:08", "09:28:10", "09:28:16", "09:28:18", "09:28:21",
"09:28:22", "09:28:24", "09:28:25", "09:28:26", "09:28:27",
"09:28:28", "09:28:34", "09:28:35", "09:28:36", "09:28:37",
"09:28:38", "09:28:39", "09:28:41", "09:28:42", "09:28:44",
"09:28:45", "09:28:46", "09:28:47", "09:28:48", "09:28:49",
"09:28:50", "09:28:52", "09:28:53", "09:28:54", "09:28:55",
"09:28:56", "09:28:58", "09:29:01", "09:29:03", "09:29:04",
"09:29:06", "09:29:13", "09:29:29", "09:29:30", "09:29:33",
"09:29:34", "09:29:36", "09:30:25", "09:30:26", "09:30:29",
"09:30:30", "09:30:31", "09:30:36", "09:30:48", "09:30:50",
"09:31:45", "09:31:47", "09:31:50", "09:31:52", "09:31:54",
"09:31:55", "09:31:57", "09:31:59", "09:32:01", "10:00:52",
"10:00:55", "10:00:57", "10:00:59", "10:01:00", "10:01:01",
"10:01:03", "10:01:04", "10:01:05", "10:01:06", "10:01:07",
"10:01:08", "10:01:51", "10:01:52", "10:02:01", "10:02:02",
"10:02:03", "10:02:04", "10:02:05", "10:02:07", "10:02:17",
"10:02:22", "10:02:24", "10:02:25", "10:02:26", "10:02:27",
"10:02:28", "10:02:29", "10:02:31", "10:02:32", "10:02:38",
"10:02:39", "10:02:40", "10:02:42", "10:02:43", "10:02:58",
"10:03:00", "10:04:24", "10:04:27", "10:04:29", "10:04:31",
"10:04:32", "10:04:33", "10:04:35", "10:04:41", "10:04:42",
"10:04:43", "10:04:44", "10:04:45", "10:04:46", "10:04:47",
"10:04:48", "10:04:49", "10:04:50", "10:04:55", "10:05:03",
"10:05:05", "10:05:06", "10:05:07", "10:05:08", "10:05:09",
"10:05:10", "10:05:27", "10:05:29", "10:05:30", "10:05:31",
"10:05:32", "10:05:41", "10:05:43", "10:06:13", "10:06:14",
"10:06:15", "10:07:31", "10:07:32", "10:08:39", "10:08:41",
"10:08:52", "10:12:47", "10:12:49", "10:12:50", "10:12:52",
"10:12:54", "10:12:56", "10:12:58", "10:13:17", "10:13:18",
"10:13:19", "10:13:21", "10:13:23", "10:13:24", "10:13:25",
"10:13:26", "10:13:28", "10:13:29", "10:13:30", "10:13:33",
"10:13:36", "10:13:40", "10:13:41", "10:13:43", "10:13:44",
"10:13:46", "10:13:49", "10:13:58", "10:14:08", "10:14:09",
"10:14:11", "10:14:12", "10:14:14", "11:30:02", "11:30:03",
"11:30:04", "11:30:06", "11:30:08", "11:30:10", "11:30:12",
"11:30:15", "11:30:17", "11:30:18", "11:30:19", "11:30:23",
"11:30:24", "11:30:26", "11:30:27", "11:30:28", "11:30:29",
"11:30:31", "11:30:33", "11:30:35", "11:30:38", "11:30:39",
"11:30:42", "11:31:03", "11:31:04", "11:31:05", "11:31:22",
"11:31:27", "11:31:28", "11:31:31", "11:31:32", "11:31:34",
"11:31:36", "11:31:38", "11:32:09", "11:32:11", "11:32:13",
"11:32:15", "11:32:16", "11:32:18", "11:32:19", "11:32:20",
"11:32:22", "11:32:23", "11:32:24", "11:32:26", "11:32:28",
"11:32:31", "11:32:35", "11:32:36", "11:32:38", "11:32:51",
"11:32:53", "11:33:27", "11:33:34", "11:33:35", "11:33:36",
"11:33:37", "11:33:39", "11:33:43", "11:33:45", "11:33:46",
"11:33:48", "11:33:49", "11:33:51", "11:33:52", "11:33:53",
"11:33:55", "11:33:56", "11:33:59", "11:34:02", "11:34:03",
"11:34:04", "11:34:07", "11:34:08", "11:34:09", "11:34:19",
"11:34:37", "11:34:38", "11:34:49", "11:34:50", "11:34:55",
"11:34:56", "11:34:59", "11:35:00", "11:35:02", "11:35:05",
"11:35:06", "11:35:14", "11:35:28", "11:35:30", "11:35:43",
"11:35:45", "11:35:46", "11:35:47", "11:35:48", "11:35:50",
"11:35:56", "11:35:59", "11:36:01", "11:36:20", "11:36:21",
"11:36:23", "11:36:24", "11:36:25", "11:36:26", "11:36:27",
"11:36:50", "11:36:51", "11:36:58", "11:36:59", "11:37:00",
"11:37:01", "11:37:02", "11:37:03", "11:37:04", "11:37:05",
"11:37:16", "11:37:22", "11:37:23", "11:37:24", "11:37:26",
"11:37:27", "11:37:30", "11:37:31", "11:37:33", "11:37:35",
"11:37:37", "11:37:40", "11:37:42", "11:37:45", "11:37:51",
"11:37:53", "11:37:54", "11:37:56", "11:37:57", "11:37:59",
"11:38:02", "11:38:03", "11:38:05", "11:38:06", "11:38:07",
"11:38:08", "11:38:10", "11:38:11", "11:38:12", "11:38:13",
"11:38:14", "11:38:15", "11:38:16", "11:38:17", "11:38:18",
"11:38:19", "11:38:21", "11:38:22", "11:38:23", "11:38:24",
"11:38:25", "11:38:26", "11:38:27", "11:38:28", "11:38:30",
"11:38:31", "11:38:32", "11:38:33", "11:38:34", "11:38:35",
"11:38:36", "11:38:37", "11:38:38", "11:38:39", "11:38:41",
"11:38:42", "11:38:43", "11:38:44", "11:38:45", "11:38:46",
"11:38:47", "11:38:48", "11:38:50", "11:38:51", "11:38:52",
"11:38:53", "11:38:54", "11:38:55", "11:38:56", "11:38:57",
"11:38:58", "11:38:59", "11:39:00", "11:39:02", "11:39:03",
"11:39:04", "11:39:05", "11:39:06", "11:39:07", "11:39:09",
"11:39:10", "11:39:11", "11:39:12", "11:39:13", "11:39:14",
"11:39:15", "11:39:16", "11:39:17", "11:39:18", "11:39:20",
"11:39:21", "11:39:22", "11:39:23", "11:39:24", "11:39:25",
"11:39:26", "11:39:28", "11:39:29", "11:39:30", "11:39:31",
"11:39:32", "11:39:33", "11:39:34", "11:39:35", "11:39:36",
"11:39:37", "11:39:38", "11:39:39", "11:39:40", "11:39:42",
"11:39:43", "11:39:44", "11:39:45", "11:39:47", "11:39:48",
"11:39:49", "11:39:50", "11:39:52", "11:39:55", "11:39:59",
"11:40:01", "11:40:02", "11:40:04", "11:40:05", "11:40:06",
"11:40:07", "11:40:08", "11:40:15", "11:40:17", "11:40:18",
"11:40:19", "11:40:20", "11:40:21", "11:40:23", "11:40:24",
"11:40:25", "11:40:26", "11:40:28", "11:40:29", "11:40:30",
"11:40:31", "11:40:32", "11:40:33", "11:40:34", "11:40:35",
"11:40:37", "11:40:39", "11:40:41", "11:40:44", "11:40:45",
"11:40:48", "11:40:53", "11:41:09", "11:41:10", "11:41:12",
"11:41:13", "11:41:14", "11:43:01", "11:43:02", "11:43:03",
"11:43:12", "11:43:13", "11:43:14", "11:43:16", "11:43:17",
"11:43:18", "11:43:19", "11:43:20", "11:43:23", "11:43:25",
"11:43:27", "11:43:33", "11:43:39", "11:43:50", "11:43:51",
"11:43:52", "11:44:01", "11:44:03", "12:05:42", "12:05:44",
"12:05:46", "12:05:56", "12:05:58", "12:06:00", "12:06:01",
"12:06:02", "12:06:04", "12:06:07", "12:06:08", "12:06:10",
"12:06:13", "12:06:24", "12:06:25", "12:06:26", "12:06:28",
"12:06:29", "12:06:30", "12:06:32", "12:06:35", "12:06:38",
"12:06:39", "12:06:40", "12:06:42", "12:06:43", "12:06:44",
"12:06:45", "12:06:47", "12:06:53", "12:06:54", "12:06:55",
"12:06:56", "12:06:57", "12:07:06", "12:07:07", "12:07:08",
"12:07:10", "12:07:12", "12:07:14", "12:07:15", "12:07:18",
"12:07:20", "12:07:27", "12:07:29", "12:07:30", "12:07:31",
"12:07:33", "12:07:34", "12:07:35", "12:07:36", "12:07:38",
"12:07:39", "12:07:40", "12:07:42", "12:07:43", "12:07:44",
"12:07:46", "12:07:47", "12:07:48", "12:07:49", "12:07:50",
"12:07:51", "12:07:53", "12:07:54", "12:07:55", "12:07:56",
"12:07:57", "12:07:58", "12:07:59", "12:08:00", "12:08:01",
"12:08:02", "12:08:03", "12:08:05", "12:08:06", "12:08:07",
"12:08:08", "12:08:10", "12:08:11", "12:08:12", "12:08:13",
"12:08:14", "12:08:15", "12:08:16", "12:08:17", "12:08:18",
"12:08:19", "12:08:21", "12:08:22", "12:08:23", "12:08:24",
"12:08:25", "12:08:26", "12:08:27", "12:08:28", "12:08:29",
"12:08:30", "12:08:31", "12:08:33", "12:08:34", "12:08:35",
"12:08:36", "12:08:37", "12:08:38", "12:08:39", "12:08:40",
"12:08:41", "12:08:43", "12:08:44", "12:08:45", "12:08:46",
"12:08:47", "12:08:48", "12:08:49", "12:08:50", "12:08:51",
"12:08:52", "12:08:54", "12:08:55", "12:08:56", "12:08:57",
"12:08:58", "12:08:59", "12:09:00", "12:09:01", "12:09:02",
"12:09:03", "12:09:04", "12:09:05", "12:09:07", "12:09:08",
"12:09:09", "12:09:10", "12:09:11", "12:09:12", "12:09:13",
"12:09:14", "12:09:15", "12:09:16", "12:09:18", "12:09:19",
"12:09:20", "12:09:21", "12:09:22", "12:09:23", "12:09:24",
"12:09:27", "12:09:28", "12:09:29", "12:09:31", "12:09:32",
"12:09:40", "12:09:41", "12:09:42", "12:09:43", "12:09:44",
"12:09:45", "12:09:46", "12:09:47", "12:09:49", "12:10:04",
"12:10:05", "12:10:06", "12:10:07", "12:10:09", "12:10:10",
"12:10:14", "12:10:15", "12:10:16", "12:10:18", "12:10:19",
"12:10:20", "12:10:21", "12:10:22", "12:10:23", "12:10:24",
"12:10:25", "12:10:26", "12:10:28", "12:10:32", "12:10:35",
"12:10:37", "12:10:38", "12:10:39", "12:10:54", "12:11:09",
"12:11:10", "12:11:11", "12:11:12", "12:11:14", "12:11:15",
"12:11:18", "12:11:20", "12:11:21", "12:17:39", "12:17:40",
"12:17:42", "12:17:45", "12:17:50", "12:17:51", "12:17:52",
"12:17:53", "12:17:55", "12:17:56", "12:17:57", "12:17:59",
"12:18:00", "12:18:02", "12:18:09", "12:18:10", "12:18:14",
"12:18:15", "12:18:24", "12:18:38", "12:18:40", "12:18:41",
"20:39:39", "20:39:41", "20:48:52", "20:48:54", "20:48:55",
"20:49:01", "20:49:02", "20:49:03", "20:49:09"), class = "factor"),
csUriStem = c("/eacommon/systemconfigurationservice.svc/custombinding",
"/services/2015v1/engservice.svc/custombinding", "/eacommon/systemconfigurationservice.svc/custombinding",
"/eacommon/systemconfigurationservice.svc/custombinding",
"/services/2015v1/engservice.svc/custombinding", "/eaudit/services/sapv1/engservice.svc/custombinding"
), timeTaken = c(7421L, 8390L, 515L, 505L, 1385L, 1365L)), row.names = c(NA,
6L), class = "data.frame")
install.packages("sqldf")
library(sqldf)
#create subset of the original data
iislog1 <- iislog %>% select(iisdate,iistime,csUriStem,timeTaken)
#Find Count by Url and then Avg,Max,Min timeTaken for each Url
iislog6 <- sqldf(SELECT csUriStem AS iislog6$baseUrl FROM iislog1,
Count(*) as iislog6$totalRequests,
AVG(timeTaken) AS iislog6$avgRequestDuration,
MAX(timeTaken) AS iislog6$maxRequestDuration,
MIN(timeTaken) AS iislog6$minRequestDuration
GROUP BY iislog6$baseUrl
ORDER By iislog6$totalRequests DESC
)
I think this is what you were trying to do. I mainly used your SQL to translate it into R.
group_by is very powerfull in R and it is easy in use.
install.packages("dplyr")
library(dplyr)
iislog1 <- iislog %>% select(iisdate,iistime,csUriStem,timeTaken)
iislog6 <- group_by(iislog1, csUriStem) %>% summarise(totalRequests = n(),
avgRequestDuration = mean(timeTaken), maxRequestDuration = max(timeTaken),
minRequestDuration = min(timeTaken))
# order by
iislog6 <- arrange(iislog6, totalRequests)
There is something wrong with the dput output in the question so we used the data in the Note at the end.
The SQL syntax in the code in the question was incorrect -- it was a mix of SQL and R but the string must be pure SQL like this:
library(sqldf)
sqldf("SELECT
csUriStem AS baseUrl,
COUNT(*) AS totalRequests,
AVG(timeTaken) AS avgRequestDuration,
MAX(timeTaken) AS maxRequestDuration,
MIN(timeTaken) AS minRequestDuration
FROM iislog1
GROUP BY baseUrl
ORDER BY totalRequests DESC")
Note
This is the data used in reproducible form:
Lines <- "iisdate iistime csUriStem timeTaken
1 2019-05-17 03:05:39 /eACommon/SystemConfigurationService.svc/customBinding 7421
2 2019-05-17 03:07:22 /Services/2015V1/EngService.svc/customBinding 8390
3 2019-05-17 03:16:40 /eACommon/SystemConfigurationService.svc/customBinding 515
4 2019-05-17 03:17:39 /eACommon/SystemConfigurationService.svc/customBinding 505
5 2019-05-17 03:25:22 /Services/2015V1/EngService.svc/customBinding 1385
6 2019-05-17 03:31:16 /eAudIT/Services/SAPv1/EngService.svc/customBinding 1365"
iislog1 <- read.table(text = Lines, as.is = TRUE)
Related
I have this data frame on which I want to apply the ARDL model but every time I run it, it gives me an error. If anyone could please help me or point out what I am doing wrong would be highly appreciated. Error:'list' object cannot be coerced to type 'double' If I remove the prediction part of the code in the loop out then it runs otherwise no.
Data:
structure(list(Industrialproduction = c(1.65801981343852, 1.79541527049647,
-0.0326429293424051, 0.104752527715549, -0.992082392187777, -2.26823002723453,
-2.33809212404366, -3.02972688245404, -2.14713572609871, -1.29947561814794,
0.104752527715549, 0.228175565411677, 0.305023871901719, 0.218860619170459,
0.216531882610155, 0.139683576120113, 0.25146293101472, 0.249134194454415,
0.626389517223712, 1.13405408737005, 0.58214352257793, -0.0629165046263609,
-0.619484542539089, -0.652086854383349, 0.591458468819148, 2.0259601899666,
1.73021064680795, 0.561184893535192, 0.207216936368938, -0.489075295162048
), Householdconsumption = c(-1.5532531908672, -1.52804903107083,
-1.51957878064746, -1.50015918211582, -1.4800165134261, -1.47578138821441,
-1.46235294242126, -1.45274643889231, -1.43477298067686, -1.42299726667364,
-1.41225451003912, -1.39892935998284, -1.38694705450587, -1.37909657850372,
-1.36525494976309, -1.34924411054818, -1.33457611591258, -1.32538279533112,
-1.31143787085362, -1.30255443748276, -1.29181168084824, -1.27838323505509,
-1.27476788426463, -1.25586476441735, -1.24336598025603, -1.22942105577852,
-1.21051793593124, -1.1953334626113, -1.17581056834279, -1.15804370160108
), Investmentgrowth = c(1.47348593810751, 2.17792802452104, 2.57620375293532,
3.11977876989162, 2.03003410582649, 1.238671909303, 0.670447905897604,
0.0127091622297187, -0.222104866574793, -0.1974558801257, -0.215618291193452,
-0.31551155206609, 0.0762776009668517, 0.37206543835596, 0.593906316397791,
0.867639797490343, 1.12321086751514, 0.272172177483322, 0.191738642754705,
0.619852617923151, 0.675637166202676, 1.31910544403161, 1.23348264899792,
0.702880782804304, 1.61748791157326, 0.308496999618827, 0.395417109728784,
0.290334588551075, -0.659300047277115, -0.117022345397083), ConsumerPriceIndex = c(-2.03033282052684,
-1.98504568168304, -1.91626049909952, -1.88507218649954, -1.82055937550506,
-1.75220143008044, -1.72955786065854, -1.7026419196476, -1.65991820375721,
-1.60053223866958, -1.57447077197644, -1.53473771619839, -1.51166690961758,
-1.46381634782035, -1.46381634782035, -1.45057199589433, -1.43860935544502,
-1.40400314557381, -1.3800778646752, -1.36341561547795, -1.35188021218754,
-1.31727400231633, -1.29933004164237, -1.28394950392183, -1.24549815962049,
-1.19380246339312, -1.19380246339312, -1.18183982294381, -1.16816823385889,
-1.14595190159589), Employment = c(-1.02390309005026, -0.997493370038682,
-0.974856467171615, -0.96353801573808, -0.978629284316127, -1.00881182147222,
-1.07294971292891, -1.14840605581914, -1.21631676442034, -1.28045465587703,
-1.32950127875568, -1.38232071877884, -1.41250325593493, -1.45023142738004,
-1.5030508674032, -1.55587030742636, -1.58228002743794, -1.56341594171538,
-1.49173241596967, -1.43136734165749, -1.38232071877884, -1.34081973018921,
-1.30686437588861, -1.2691362044435, -1.24272648443192, -1.22386239870936,
-1.20499831298681, -1.19745267869778, -1.18990704440876, -1.17481577583072
), Unemploymentrate = c(-0.815370914670033, -0.815370914670033,
-0.772756573338144, -0.687527890674367, -0.517070525346812, -0.303998818687369,
0.0795302532996298, 0.463059325286628, 0.803974055941737, 1.05966010393307,
1.18750312792874, 1.3153461519244, 1.40057483458818, 1.44318917592007,
1.57103219991573, 1.6988752239114, 1.74148956524329, 1.82671824790707,
1.86933258923895, 1.91194693057084, 1.99717561323462, 1.95456127190273,
1.91194693057084, 1.86933258923895, 1.78410390657518, 1.74148956524329,
1.74148956524329, 1.74148956524329, 1.74148956524329, 1.78410390657518
), Stockmarketindex = c(-1.66493184730628, -1.66463355820282,
-1.6694061838583, -1.6887949755837, -1.67417880951378, -1.66493184730628,
-1.64285845364968, -1.63748924978726, -1.63152346771791, -1.61601243433759,
-1.62615426385549, -1.62078505999307, -1.60616889392316, -1.58976299323243,
-1.56082895019607, -1.53875555653946, -1.51548900646899, -1.47790457943206,
-1.48088747046674, -1.47074564094884, -1.41615873501425, -1.43345950301538,
-1.40631519459982, -1.36544958742475, -1.32577713666355, -1.32816344949129,
-1.3189164872838, -1.2792440365226, -1.17722916313666, -1.1805103432748
), Economicgrowth = c(-0.419475860074214, 1.77103185704958, -1.24091625399564,
0.219422224086891, -0.693289324714688, -1.14964509911548, -0.282569127753977,
-0.738924902154767, -0.282569127753977, -0.14566239543374, 0.26505780152697,
-0.191297972873819, -0.14566239543374, 0.26505780152697, -0.14566239543374,
0.0825154917666544, 0.630142421047602, 0.128151069206733, 0.26505780152697,
0.173786646646812, 0.0825154917666544, -0.647653747274609, 0.0368799143265754,
0.675777998487681, 0.128151069206733, 0.72141357592776, -0.191297972873819,
-0.14566239543374, 0.26505780152697, 0.0825154917666544), Consumptiongrowth = c(1.49948934326176,
2.80290969177971, 2.43863500922448, 3.0742184397245, 3.29809558837824,
1.78028441106475, 1.98708618397371, 1.30407115418265, 1.06311862978413,
1.41221520056623, 1.19213257985578, 1.30976294609757, 0.943590999570694,
0.717816586945313, 0.803193465669196, 0.856316856875168, 0.915132039996066,
0.932207415740842, 0.877186760563229, 0.550857357440829, 0.359233696305002,
0.484453118433365, 0.0879249483602165, 0.410459823539332, 0.437021519142318,
0.419946143397541, 0.898056664251289, 0.717816586945313, 0.896159400279647,
0.962563639287112), Governmentexpenditure = c(-1.40005492084802,
-1.38413625639177, -1.36971935273328, -1.35410104043658, -1.33277603710839,
-1.31355349889707, -1.28802356533516, -1.2715041965598, -1.26880102712384,
-1.2558858842631, -1.24627461515744, -1.24417215004058, -1.22765278126522,
-1.21503799056404, -1.2159390470427, -1.20692848225614, -1.18259995733244,
-1.17989678789647, -1.18139854869423, -1.17058587095036, -1.17509115334364,
-1.14956121978173, -1.13814783771876, -1.13093938588951, -1.13274149884682,
-1.12853656861309, -1.1210277646243, -1.11622213007147, -1.09820100049835,
-1.07867811012748), Longtermgovernmentbondyield = c(1.40229182288022,
1.52084996657255, 1.52084996657255, 2.1284604529957, 2.10623080105339,
1.8221852484572, 1.74561644732258, 1.8221852484572, 1.79254571253412,
2.04695172920723, 2.32358739782265, 2.3705166630342, 1.87899435897644,
1.81477536447643, 1.26150402724559, 1.27879375653405, 1.22939452999558,
1.13306603824557, 1.19728503274558, 1.07872688905325, 1.0515573144571,
1.28126371786097, 1.19234511009173, 1.10342650232249, 1.21704472336097,
1.14294588355326, 1.05649723711094, 1.08119685038018, 0.811971065745526,
0.752691993899364), BankRate = c(1.46586697149636, 1.35154387389459,
1.66960408302535, 1.97274804858215, 2.29546045675764, 2.29546045675764,
2.09326712428386, 1.92386866579365, 1.57025981463491, 1.25236650053715,
1.3619748134568, 1.79713275011286, 1.62283175002842, 1.46140252936374,
1.11755703763521, 0.767494705927617, 1.00504892351727, 0.836192873884299,
0.743461821176297, 0.639548801257612, 0.614285065637952, 0.59615609267884,
1.0233656533885, 0.831874464905546, 1.44483819733896, 1.35112663631211,
1.16530987895099, 1.12197975600959, 1.27587783831036, 0.9050787987531
), ConsumerConfidenceIndex = c(0.846829650502804, 1.60472118016078,
0.469774413325411, -0.621585188209513, -1.60430771883233, -1.68373613752742,
-1.63528611498984, -1.66413766753932, -1.70435864332681, -1.66902678210495,
-1.59673510529459, -1.59602090595954, -0.999706472923775, 0.0694026684451194,
0.236084189726601, 0.627318384290896, 0.856229774103751, 1.00626414911988,
1.18224076468833, 1.53172580694677, 1.23795881575313, 0.203420073079754,
0.031697144727374, 0.197538431497049, -0.4751060554715, -0.723547646218374,
-0.38459179268613, -0.144363494292252, -0.345373846847121, -0.204466519215588
), RealPersonalDisposableIncome = c(-1.61847984374121, -1.5861635599299,
-1.57225712600034, -1.49848239094777, -1.53946529757862, -1.54497109045523,
-1.52492940490883, -1.54175692919285, -1.53951841454553, -1.57492545682787,
-1.59099234107728, -1.58530147051583, -1.59103377902389, -1.5730264259375,
-1.58525138856384, -1.58529970465885, -1.58192644597089, -1.52325368596072,
-1.53501582928257, -1.52925478110938, -1.50631522176011, -1.51590689703409,
-1.46151870482198, -1.40729486382567, -1.3789215787237, -1.3693640758863,
-1.36306692499173, -1.34201378673398, -1.29684320450097, -1.22228202649678
), PersonalDisposableIncome = c(-1.63374935499688, -1.61912533368493,
-1.59170800880699, -1.55197024453754, -1.5482842190616, -1.53111502598353,
-1.51272050030567, -1.496600325591, -1.47962148432076, -1.47543914833698,
-1.46603002900108, -1.44363362658138, -1.43430337270118, -1.41678955114361,
-1.41553667304378, -1.4009808145215, -1.39475625982839, -1.36509006246891,
-1.3676348839483, -1.35648303480995, -1.33818372341837, -1.33674498698592,
-1.3094343652563, -1.28373893947937, -1.27703100460648, -1.26432160075519,
-1.25275608335059, -1.23583637919461, -1.22110869865322, -1.18194367906969
), SPPricechange = c(1.26871538917159, 0.851034944363406, -0.128615553459435,
0.296659081254357, -2.70557732809419, 0.554861538044873, 0.509296398611252,
-0.98675901279262, 0.782687235212975, -0.391880803520353, -1.49050694319765,
-0.890565940654977, -0.386818010249951, -0.642489070405266, 0.0637705908158519,
0.256156735091138, 0.709276732792142, 0.689025559710533, 0.129586903331082,
-0.351378457357135, 0.213122992292719, 0.314378857700765, -0.217214435691474,
0.43841729282562, -0.202026055880268, 0.177683439399903, -1.00701018587423,
1.01304432901628, 1.20796186992677, 0.228311372103926), HouseStarts = c(-0.752212186140825,
1.99649271779397, 1.8436488194287, 1.69950335430372, -0.603096187735683,
0.0865653048881011, -0.685109986858511, -1.57110754404907, -1.21198651455668,
-0.257644124763769, -0.214151958562269, -0.962217217228067, -0.0128453607153271,
0.914159096036641, 0.712852498189699, 0.0766242383277583, 1.13783309364436,
1.96915478475302, 1.07942932760234, 0.407164701459157, 0.581133366265157,
1.28073592544928, 0.633323965706957, -0.424156989649512, -0.316047890805783,
1.23848639256783, 0.96137916219827, 0.337577235536758, -0.0811901933176841,
1.76039238698582), HouseCompleted = c(0.727121448038834, 1.51512215827386,
1.27770235093872, 4.62342810215839, 1.63310378032383, 1.60397251562013,
1.87343671412934, 2.03511523323486, 1.11893695830357, 0.288695914248185,
0.362980639242614, 0.395025030416681, -0.395888806288709, -0.695940832736795,
-0.378410047466491, 0.467853192175925, -0.349278782762793, 0.483875387762959,
0.46930975541111, 1.47288182445349, 0.598943883342565, 0.362980639242614,
0.829080874501776, 1.38985772004796, 0.143039590729697, 0.281413098072261,
0.138669901024142, 0.973280634785079, -0.238579976888742, 0.502810709820363
), TermSpread = c(-0.982486215892947, -1.35440528815526, -1.77852352845439,
-2.1243430166983, -2.91385543325514, -2.47668740094681, -1.8046231124728,
-0.891137671828519, 0.83143487338641, 1.14462988160731, -0.499643911552399,
-0.127724839290084, 0.43994111311029, 0.727036537312779, 0.916258521446237,
0.629163097243749, 0.37469215306427, 0.857534457404817, 0.968457689483053,
0.968457689483053, 1.18377925763492, 1.444775097819, 0.335542777036658,
0.981507481492256, -1.19780778404481, -0.89766256783312, -0.656241415662847,
-0.538793287580011, -1.4718534162381, -0.1799240073269), BuildingPermits = c(-0.757294212433685,
1.98548228249596, 1.83296803797682, 1.68913346590998, -0.608499827536959,
0.0796742026103982, -0.690336739230158, -1.5744233761582, -1.21607689919859,
-0.263792835859544, -0.220394473597999, -0.966846304496574, -0.0195220539874191,
0.905483038787227, 0.704610619176647, 0.0697545769506165, 1.12867461613232,
1.95820331193156, 1.0703968153811, 0.399582130138359, 0.573175579184539,
1.27126923499168, 0.625253613898393, -0.429946565660888, -0.322070636610762,
1.22911082593761, 0.95260126067119, 0.330144750519887, -0.0877194803984184,
1.74989117307615), Date = structure(c(289094400, 297043200, 304992000,
312854400, 320716800, 328665600, 336614400, 344476800, 352252800,
360201600, 368150400, 376012800, 383788800, 391737600, 399686400,
407548800, 415324800, 423273600, 431222400, 439084800, 446947200,
454896000, 462844800, 470707200, 478483200, 486432000, 494380800,
502243200, 510019200, 517968000), class = c("POSIXct", "POSIXt"
), tzone = "UTC"), NORTH = c(4.06976744186047, 5.51675977653633,
7.2799470549305, 4.75015422578655, 4.59363957597172, 3.15315315315317,
1.2008733624454, -0.377562028047452, -0.108283703302655, 0.650406504065032,
0.969305331179318, 0.106666666666688, 3.09003729355352, 2.11886304909562,
2.32793522267207, 5.68743818001977, -1.46934955545156, 3.95611702127658,
5.19438987619354, -0.0912012507600199, 2.81677896109541, 3.97412590369087,
1.30118326353028, 3.31553807249226, 1.32872294960955, 2.93700394923507,
0.908853875665812, 1.81241002546971, -1.3414545718222, 4.81772747317361
), YORKSANDTHEHUMBER = c(4.0121120363361, 5.45851528384282, 9.52380952380951,
6.04914933837431, 3.03030303030299, 5.42099192618225, 2.78993435448577,
-0.53219797764768, 1.97966827180309, 1.15424973767052, 0.466804979253115,
-1.96179659266907, 2.42232754081095, 0.719794344473031, -0.306278713629415,
3.37941628264209, 2.74393263992076, 3.91920555341303, 1.91585099967527,
0.892125625853447, 2.91888477848958, 3.78293078507868, 0.109815847271484,
6.83486625601216, 0.722691730511011, 3.56008625759656, -0.227160867754524,
2.69419041475355, -1.17134094520194, 2.78546324684064), NORTHWEST = c(6.57894736842105,
6.95256660168939, 6.50060753341436, 5.5904164289789, 4.59211237169096,
4.70041322314051, 2.96003946719288, -1.38955438428365, 0.242954324586984,
2.18128938439167, -0.853889943073994, -2.15311004784691, 0.929095354523226,
2.51937984496125, 0.189035916824195, 2.21698113207546, 2.51499769266268,
3.5066396578888, 1.77437592415414, 0.948636868643719, 4.60125296308836,
3.95775160859537, -0.237455720347246, 4.218042765725, 2.79306600771276,
2.22545984338008, 0.709042970141798, 0.258269945161875, 0.663420142564747,
2.23655612423752), EASTMIDS = c(4.98489425981872, 8.20143884892085,
6.91489361702127, 5.22388059701494, 5.61465721040189, 4.64465584778958,
2.03208556149733, 0.314465408805028, 2.82131661442007, 0, 2.79471544715448,
-0.939199209095414, -1.14770459081835, 2.97829379101462, -0.68627450980392,
3.40572556762095, 3.42243436754175, 4.89223242719342, 0.730408764905171,
2.10107893242476, 2.31025926242835, 5.01798109893785, 0.382256908497274,
4.64894882982943, 3.04374194526571, 2.25491999264298, 0.651125980286367,
1.40105078809108, 2.87265165133409, 3.59418899472349), WESTMIDS = c(4.65838509316771,
4.74777448071216, 8.66855524079319, 6.56934306569344, 3.22896281800389,
3.17535545023698, 0.643086816720257, -1.36923779096303, 1.61962054604351,
2.00364298724953, -0.491071428571428, -2.78151637505608, 0, 2.39963082602676,
0.540784136998647, 1.83774092335275, 4.66989436619718, 1.82498633362771,
2.51909973157134, 0.644511581067457, 3.9503702221333, 3.15724626520867,
0.548671245147809, 4.19837410445824, 3.20983256145349, 1.12526319422872,
1.4028740144042, 0.434226470984247, -0.194389516372279, 2.32714328889485
), EASTANGLIA = c(6.74525212835624, 8.58895705521476, 8.47457627118643,
10.7291666666667, 4.8447789275635, 4.84522207267835, -0.299529311082601,
1.45922746781116, 0.88832487309645, 0.29350104821803, -0.877926421404701,
1.64487557992411, -2.69709543568468, 3.49680170575694, 3.25504738360115,
2.39425379090184, 2.98519095869059, 4.36691137516082, 3.57868020304568,
1.66275772744776, 3.79450451070863, 4.52162951167727, 2.28203256419209,
4.17054552224914, 3.2439678284182, 4.76643873164257, 0.955633279171614,
2.91614381581101, 0.848198902642676, 5.02010671012167), OUTERSEAST = c(6.7110371602884,
7.53638253638255, 9.47317544707589, 8.56512141280351, 3.82269215128102,
2.11515863689776, 1.64940544687381, -1.73584905660378, 1.34408602150539,
1.78097764304659, 0.446760982874161, -1.26019273535953, 0.150150150150159,
3.11094452773611, 1.4176663031625, 2.54480286738352, 5.56448794127927,
4.89371564797033, 3.88257575757575, 1.85961713764815, 5.54859495256845,
4.29879599796508, 2.00525702517411, 3.63679834232127, 3.44509381728699,
3.46664684309643, 1.93988743863012, 2.50440502760482, 2.96578121060713,
4.47634947134114), OUTERMET = c(4.54545454545458, 6.58505698607005,
7.36633663366336, 7.08225746956843, 4.3747847054771, 1.68316831683168,
1.00616682895164, -1.28534704370181, 2.01822916666665, 0.797702616464613,
0.949667616334271, -0.940733772342415, 1.10794555238999, 2.19160926737633,
2.84926470588237, 2.62138814417631, 5.02467343976781, 5.65213786241397,
3.22555328833776, 3.73552294786995, 5.05948745510956, 4.28797321179426,
2.86300392436674, 2.60339894216597, 4.28031183318191, 3.43199821714381,
3.34554286721641, 3.04770569170409, 1.65167650683293, 4.62120252591965
), LONDON = c(8.11719500480309, 10.3065304309196, 6.32299637535239,
7.65151515151515, 1.30190007037299, 2.1535255296978, -0.204012240734436,
-0.306643952299836, 0.786056049213951, 1.18684299762631, 1.00536193029493,
-2.85335102853352, 2.76639344262296, 2.06048521103356, 1.23738196027352,
2.70183338694115, 3.30410272471031, 5.76322570865546, 4.73255747291176,
1.98428989791171, 6.03563952552197, 4.88977753030802, 2.12581135535556,
4.43247330120026, 5.42986425339366, 3.96781115879828, 3.43247538648888,
4.0668901660281, 4.09587727708534, 4.81707991010573), SOUTHWEST = c(6.17577197149644,
7.71812080536912, 7.63239875389407, 9.45489628557649, 2.46804759806079,
2.19354838709679, 1.72558922558922, 0.248241621845247, 1.48576145274456,
2.03334688897925, -0.677560781187733, -2.3274478330658, 1.80772391125718,
2.42130750605327, 1.85185185185186, 0.928433268858785, 5.95247221157533,
4.38447346525341, 3.30272049904696, 2.25107353730542, 3.86823714688802,
2.04371722787289, 3.04596811639065, 4.19057346270538, 2.45646407565451,
2.17525889239081, 2.83400809716597, 1.58015962290428, 2.77894958869438,
4.08650146221331), WALES = c(6.09418282548476, 8.35509138381203,
7.40963855421687, 7.01065619742007, 1.15303983228513, 3.47150259067357,
-0.150225338007013, 0.852557673019058, 0.944803580308295, -1.13300492610835,
0.946686596910786, -2.17176702862782, 3.98587285570131, 0.485201358563789,
3.62143891839691, 1.63094128611373, 1.61852361302152, 4.32251951450617,
1.28887158859911, 0.68747598104105, 3.71925360474978, 4.66941979801284,
1.44927536231884, 1.05121293800539, 1.67663757954501, 2.9419480568152,
-0.422309596621509, 2.67987715706347, 0.0249243368346056, 2.03260714794249
), SCOTLAND = c(5.15222482435597, 4.12026726057908, 5.40106951871658,
8.67579908675796, -0.280112044817908, 2.94943820224719, 1.04592996816735,
1.21512151215122, 1.33392618941751, 3.59806932865292, 0.974163490046604,
0.125838926174496, 1.46627565982404, 3.42691990090835, -0.838323353293421,
1.97262479871176, 3.40702724042636, 4.30649410147751, 2.44866586142527,
1.93997856377279, 2.09581887638873, 4.22573890357352, 0.833278440155458,
4.15155969296095, 2.01655899140689, 1.93980755633434, 0.325693606755129,
0.796561260069754, -0.381713535919834, 2.90974405029185), NIRELAND = c(4.54545454545454,
4.94752623688156, 4.42857142857145, 2.96397628818967, 6.06731620903454,
0.0835073068893502, -1.66875260742594, -2.96987696224015, -1.18058592041975,
-0.884955752212393, -1.74107142857143, -0.545206724216265, 1.96436729100047,
-0.224014336917564, -1.84104176021554, 1.6010978956999, 1.42278253039172,
1.97993429814437, 1.29287828660979, 1.61158623060724, 2.28387751649466,
1.84005954349984, 1.79057208981284, 2.22177901874749, 2.88757950598978,
-0.731975575530031, 3.07939176281808, -0.0593031875463392, -1.05696484201158,
3.40717418194087), UK = c(5.76890543055322, 7.20302836425676,
7.39543442582184, 7.22885986848197, 3.23472252213347, 2.95766398929048,
1.20271423347285, -0.554061107319231, 0.98913965036942, 1.55113136643479,
0.373986300291293, -1.61195434757029, 1.59052858167903, 2.07573082205217,
1.17628969016684, 2.44680851063832, 2.84453345201007, 4.10010457610617,
2.88208396840793, 1.58922558922557, 3.67559326527908, 3.90013106997858,
1.36611181194425, 4.12505691303686, 2.02017257462689, 2.93167985827357,
1.54068234183715, 2.12149379408387, 0.594313861969269, 3.83755588673622
)), row.names = c(NA, 30L), class = "data.frame")
Code:
library(tidyverse)
library(GGally)
library(Amelia)
library(inspectdf)
library(ggcorrplot)
library(ggplot2)
library(reshape2)
library(tseries)
library(dplyr)
library(caret)
library(tidyverse)
library(ARDL)
library(dLagM)
library(forecast)
in_sampleARDL <- data %>%
dplyr::filter(Date < '2020-03-01')
out_sampleARDL <-data %>%
dplyr::filter(Date >= '2020-03-01')
# Model Building
# Create the formulas
indep_vars <- expression(Industrialproduction, Householdconsumption, Investmentgrowth, ConsumerPriceIndex, Employment, Unemploymentrate,
Stockmarketindex, Economicgrowth, Consumptiongrowth, Governmentexpenditure, Longtermgovernmentbondyield,
BankRate, ConsumerConfidenceIndex, RealPersonalDisposableIncome, PersonalDisposableIncome, SPPricechange,
HouseStarts, HouseCompleted, TermSpread, BuildingPermits)
dep_vars <- expression(NORTH, YORKSANDTHEHUMBER, NORTHWEST, EASTMIDS, WESTMIDS, EASTANGLIA, OUTERSEAST, OUTERMET, LONDON,
SOUTHWEST, WALES, SCOTLAND, NIRELAND, UK)
# Formulae with diff()
formulae <- unlist(lapply(dep_vars, \(x) lapply(indep_vars, \(y) bquote(.(x)~diff(.(y))))))
length(formulae)
# Without diff()
formulae2 <- unlist(lapply(dep_vars, \(x) lapply(indep_vars, \(y) bquote(.(x)~.(y)))))
length(formulae2)
result <- vector('list', length = length(formulae))
names(result) <- formulae2
# Loop for H = 4
for (i in seq_along(formulae)){
# auto_ardl
result[[i]][[1]] <- auto_ardl(formula(formulae2[[i]]),
data = in_sampleARDL, max_order = 4, selection = 'BIC')
# prediction
result[[i]][[2]] <- forecast(ardlDlm(formula = formula(formulae[[i]]), data = in_sampleARDL, p = 3),
x = out_sampleARDL |> select(sub("\\s~.*", "", formula(formulae[[i]]))) |> pull(), h = 4)
# error
result[[i]][[3]] <- mean((out_sampleARDL |> select(sub("\\s~.*", "", formula(formulae[[i]]))) |> pull() |> (\(x) x[1:4])() - result[[i]][[2]][["forecasts"]])^2)
# set names
names(result[[i]]) <- c('auto_ardl','forecast','error')
}
print(result[[i]])
traceback() shows that this error is coming from the forecast call, and that it occurs with i==1, so look at the first parameter to forecast :: ardlDlm(formula = formula(formulae[[i]]), data = in_sampleARDL, p = 3) and realize that it is not something that forecast is designed to work with. forecast was expecting an atomic numeric vector.
Looking at the output of ardlDlm(formula = formula(formulae[[1]]), data = in_sampleARDL, p = 3), it appears that you really want numeric vectors contained in the $data leaf of that much longer list and in particular probably want only the i-th column, so try this:
for (i in seq_along(formulae)){
# auto_ardl
result[[i]][[1]] <- auto_ardl(formula(formulae2[[i]]),
data = in_sampleARDL,
max_order = 4, selection = 'BIC')
# prediction
#
result[[i]][[2]] <- forecast(ardlDlm(formula = formula(formulae[[i]]),
#---------------extract one col------------------\/-\/-\/-
data = in_sampleARDL, p = 3)$data[[i]],
x = out_sampleARDL |>
select(sub("\\s~.*", "", formula(formulae[[i]]))) |>
pull(), h = 4)
# error
result[[i]][[3]] <- mean((out_sampleARDL |> select(sub("\\s~.*",
"", formula(formulae[[i]]))) |>
pull() |> (\(x) x[1:4])() -
result[[i]][[2]][["forecasts"]])^2)
# set names
names(result[[i]]) <- c('auto_ardl','forecast','error')
}
Note that you only printed the last value in the much longer result object. The last such value looks like:
print(result[[i]])
$auto_ardl
$auto_ardl$best_model
Time series regression with "ts" data:
Start = 5, End = 30
Call:
dynlm::dynlm(formula = full_formula, data = data, start = start,
end = end)
Coefficients:
(Intercept) L(UK, 1) BuildingPermits L(BuildingPermits, 1) L(BuildingPermits, 2)
1.59718 -0.04719 0.90441 -0.04269 0.19583
L(BuildingPermits, 3) L(BuildingPermits, 4)
0.63773 0.02544
$auto_ardl$best_order
[1] 1 4
$auto_ardl$top_orders
UK BuildingPermits BIC
1 1 4 90.18992
2 2 4 93.11884
3 3 4 96.02905
4 1 3 98.36867
5 4 4 99.15721
6 3 3 100.20359
7 2 3 100.53056
8 2 2 104.78506
9 1 2 104.85999
10 1 1 106.10666
$forecast
Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
1 NaN NaN NaN NaN NaN
2 NaN NaN NaN NaN NaN
3 NaN NaN NaN NaN NaN
4 NaN NaN NaN NaN NaN
$error
[1] NaN
I've average distance travelled data meters for several days and times of the year. Here's how the dataset I'm working with looks like:
> print(datanet)
Date & Time [Local] meters
1: 2017-06-01 00:00:14 2.333355
2: 2017-06-01 01:00:13 6.952414
3: 2017-06-01 02:00:30 61.727543
4: 2017-06-01 03:00:15 235.873883
5: 2017-06-01 04:00:15 138.136375
---
1428: 2017-07-30 19:00:21 40.602983
1429: 2017-07-30 20:00:47 34.292888
1430: 2017-07-30 21:00:20 303.478297
1431: 2017-07-30 22:00:18 5.741059
Now, I would like to transform this table so that it provides the average distance travelled for each hour of the day from 0 to 23, based on data from multiple days. Here's the code I've been using for that purpose (additionally includes an sd column):
data_travel<-datanet %>%
mutate(
date = ymd_hms(`Date & Time [Local]`),
hour = hour(date)
) %>%
group_by(hour) %>%
summarise(
avg_meters = mean(meters),
sd_meters = sd(meters)
)
This works, but sadly the last hour of the day 23 always shows NA values:
> head(data_travel[19:24,])
# A tibble: 6 x 3
hour avg_meters sd_meters
<int> <dbl> <dbl>
1 18 57.4 109.
2 19 96.5 177.
3 20 121. 248.
4 21 141. 299.
5 22 76.4 86.4
6 23 NA NaN
Does somebody have an idea of how I could modify this code so that I also get the average distance travelled avg_meters and sd for hour 23? Any input is appreciated!
> dput(datanet[1:700,])
structure(list(`Date & Time [Local]` = structure(c(1464732013,
1464735613, 1464739229, 1464742813, 1464746413, 1464750018, 1464753629,
1464757213, 1464760813, 1464764430, 1464768013, 1464771629, 1464775214,
1464778818, 1464782429, 1464786013, 1464789623, 1464793214, 1464796813,
1464800413, 1464804029, 1464807612, 1464811213, 1464814830, 1464818411,
1464822013, 1464825629, 1464829213, 1464832812, 1464836417, 1464840021,
1464843612, 1464847211, 1464850830, 1464854412, 1464858030, 1464861629,
1464865211, 1464868814, 1464872416, 1464876030, 1464879611, 1464883212,
1464886811, 1464890430, 1464894017, 1464897611, 1464901217, 1464904830,
1464908419, 1464912011, 1464915610, 1464919207, 1464922850, 1464926410,
1464930004, 1464933623, 1464937249, 1464940811, 1464944410, 1464948011,
1464951629, 1464955218, 1464958811, 1464962430, 1464966018, 1464969610,
1464973214, 1464976848, 1464980410, 1464984010, 1464987610, 1464991230,
1464994811, 1464998409, 1465002003, 1465005610, 1465009222, 1465012817,
1465016402, 1465020030, 1465023618, 1465027214, 1465030846, 1465034419,
1465038020, 1465041690, 1465045212, 1465048849, 1465052409, 1465056029,
1465059617, 1465063209, 1465066830, 1465070410, 1465074009, 1465077630,
1465081240, 1465084804, 1465088401, 1465092010, 1465095622, 1465099222,
1465102852, 1465106449, 1465110010, 1465113612, 1465117270, 1465120849,
1465124408, 1465128011, 1465131617, 1465135230, 1465138848, 1465142408,
1465146008, 1465149612, 1465153250, 1465156808, 1465160427, 1465164016,
1465167601, 1465171229, 1465174830, 1465178415, 1465182054, 1465185656,
1465189209, 1465192807, 1465196422, 1465200029, 1465203732, 1465207230,
1465210848, 1465214408, 1465218050, 1465221629, 1465225216, 1465228823,
1465232415, 1465236015, 1465239615, 1465243256, 1465246830, 1465250414,
1465254008, 1465257629, 1465261214, 1465264814, 1465268449, 1465272007,
1465275630, 1465279255, 1465282845, 1465286460, 1465290013, 1465293617,
1465297226, 1465300814, 1465304418, 1465308029, 1465311614, 1465315214,
1465318814, 1465322429, 1465326007, 1465329607, 1465333213, 1465336813,
1465340422, 1465344013, 1465347615, 1465351230, 1465354813, 1465358413,
1465362014, 1465365630, 1465369216, 1465372830, 1465376413, 1465380013,
1465383606, 1465387230, 1465390817, 1465394430, 1465398013, 1465401613,
1465405213, 1465408829, 1465412411, 1465416013, 1465419613, 1465423229,
1465426812, 1465430412, 1465434011, 1465437614, 1465441224, 1465444812,
1465448413, 1465452013, 1465455629, 1465459213, 1465462817, 1465466430,
1465470011, 1465473611, 1465477211, 1465480830, 1465484412, 1465488012,
1465491611, 1465495230, 1465498820, 1465502426, 1465506011, 1465509606,
1465513212, 1465516830, 1465520419, 1465524003, 1465527611, 1465531227,
1465534850, 1465538403, 1465542010, 1465545612, 1465549229, 1465552811,
1465556425, 1465560011, 1465563611, 1465567227, 1465570819, 1465574430,
1465578018, 1465581610, 1465585210, 1465588830, 1465592418, 1465596009,
1465599602, 1465603209, 1465606829, 1465610450, 1465614009, 1465617609,
1465621210, 1465624817, 1465628422, 1465632017, 1465635610, 1465639210,
1465642829, 1465646417, 1465650008, 1465653630, 1465657209, 1465660813,
1465664451, 1465668003, 1465671609, 1465675228, 1465678816, 1465682409,
1465686002, 1465689608, 1465693229, 1465696816, 1465700401, 1465704008,
1465707629, 1465711217, 1465714809, 1465718429, 1465722016, 1465725608,
1465729201, 1465732830, 1465736415, 1465740024, 1465743630, 1465747215,
1465750811, 1465754430, 1465758016, 1465761607, 1465765230, 1465768828,
1465772415, 1465776016, 1465779613, 1465783260, 1465786808, 1465790414,
1465794014, 1465797659, 1465801216, 1465804807, 1465808430, 1465812030,
1465815614, 1465819220, 1465822816, 1465826408, 1465830029, 1465833613,
1465837215, 1465840829, 1465844414, 1465848008, 1465851627, 1465855213,
1465858814, 1465862414, 1465866029, 1465869607, 1465873207, 1465876814,
1465880429, 1465884015, 1465887630, 1465891207, 1465894815, 1465898429,
1465902014, 1465905614, 1465909218, 1465912824, 1465916413, 1465920013,
1465923618, 1465927229, 1465930813, 1465934413, 1465938013, 1465941613,
1465945229, 1465948811, 1465952412, 1465956022, 1465959626, 1465963214,
1465966830, 1465970412, 1465974030, 1465977606, 1465981230, 1465984813,
1465988429, 1465992012, 1465995613, 1465999229, 1466002812, 1466006404,
1466010012, 1466013626, 1466017211, 1466020830, 1466024412, 1466028012,
1466031619, 1466035211, 1466038813, 1466042430, 1466046004, 1466049612,
1466053212, 1466056830, 1466060420, 1466064026, 1466067603, 1466071211,
1466074829, 1466078410, 1466082019, 1466085619, 1466089211, 1466092804,
1466096429, 1466100011, 1466103611, 1466107230, 1466110821, 1466114422,
1466118009, 1466121611, 1466125234, 1466128803, 1466132412, 1466136027,
1466139610, 1466143210, 1466146834, 1466150410, 1466154034, 1466157609,
1466161210, 1466164834, 1466168403, 1466172007, 1466175620, 1466179202,
1466182802, 1466186433, 1466190020, 1466193609, 1466197209, 1466200802,
1466204433, 1466208009, 1466211609, 1466215202, 1466218854, 1466222419,
1466226009, 1466229634, 1466233208, 1466236811, 1466240426, 1466244008,
1466247608, 1466251234, 1466254826, 1466258409, 1466262008, 1466265609,
1466269233, 1466272808, 1466276408, 1466280011, 1466283647, 1466287216,
1466290808, 1466294408, 1466298033, 1466301601, 1466305210, 1466308825,
1466312407, 1466316009, 1466319634, 1466323208, 1466326833, 1466330408,
1466334007, 1466337633, 1466341210, 1466344834, 1466348419, 1466352015,
1466355616, 1466359223, 1466362820, 1466366415, 1466370014, 1466373622,
1466377205, 1466380815, 1466384414, 1466388033, 1466391608, 1466395206,
1466398833, 1466402415, 1466406017, 1466409634, 1466413214, 1466416817,
1466420431, 1466424008, 1466427615, 1466431234, 1466434813, 1466438434,
1466442013, 1466445614, 1466449207, 1466452835, 1466456413, 1466460013,
1466463613, 1466467213, 1466470834, 1466474413, 1466478014, 1466481633,
1466485223, 1466488806, 1466492416, 1466496035, 1466499613, 1466503206,
1466506835, 1466510412, 1466514012, 1466517635, 1466521213, 1466524823,
1466528413, 1466532010, 1466535605, 1466539234, 1466542812, 1466546405,
1466550012, 1466553612, 1466557234, 1466560813, 1466564412, 1466568035,
1466571605, 1466575214, 1466578835, 1466582412, 1466586012, 1466589605,
1466593222, 1466596811, 1466600412, 1466604005, 1466607629, 1466611212,
1466614811, 1466618430, 1466622019, 1466625612, 1466629230, 1466632820,
1466636411, 1466640010, 1466643629, 1466647213, 1466650811, 1466654430,
1466658019, 1466661619, 1466665218, 1466668812, 1466672430, 1466676011,
1466679610, 1466683220, 1466686830, 1466690419, 1466694010, 1466697614,
1466701247, 1466704818, 1466708411, 1466712028, 1466715618, 1466719203,
1466722810, 1466726423, 1466730010, 1466733609, 1466737223, 1466740817,
1466744403, 1466748031, 1466751617, 1466755210, 1466758811, 1466762411,
1466766030, 1466769619, 1466773212, 1466776847, 1466780417, 1466784009,
1466787609, 1466791231, 1466794818, 1466798409, 1466802010, 1466805609,
1466809230, 1466812817, 1466816401, 1466820009, 1466823660, 1466827217,
1466830831, 1466834409, 1466838008, 1466841619, 1466845216, 1466848808,
1466852404, 1466856021, 1466859616, 1466863232, 1466866808, 1466870408,
1466874011, 1466877630, 1466881215, 1466884818, 1466888417, 1466892019,
1466895616, 1466899207, 1466902809, 1466906430, 1466910016, 1466913611,
1466917226, 1466920821, 1466924416, 1466928008, 1466931622, 1466935231,
1466938815, 1466942431, 1466946015, 1466949629, 1466953215, 1466956808,
1466960415, 1466964030, 1466967614, 1466971215, 1466974812, 1466978430,
1466982014, 1466985614, 1466989208, 1466992830, 1466996413, 1467000014,
1467003614, 1467007230, 1467010814, 1467014415, 1467018015, 1467021630,
1467025214, 1467028830, 1467032415, 1467036030, 1467039614, 1467043206,
1467046815, 1467050430, 1467054012, 1467057613, 1467061213, 1467064814,
1467068430, 1467072013, 1467075608, 1467079250, 1467082814, 1467086414,
1467090007, 1467093629, 1467097214, 1467100824, 1467104413, 1467108013,
1467111630, 1467115213, 1467118813, 1467122429, 1467126006, 1467129613,
1467133213, 1467136829, 1467140412, 1467144013, 1467147613, 1467151214,
1467154829, 1467158410, 1467162027, 1467165605, 1467169212, 1467172813,
1467176428, 1467180012, 1467183619, 1467187220, 1467190812, 1467194405,
1467198012, 1467201629, 1467205218, 1467208830, 1467212411, 1467216004,
1467219611, 1467223211, 1467226829, 1467230411, 1467234012, 1467237612,
1467241229, 1467244811, 1467248405), class = c("POSIXct", "POSIXt"
), tzone = ""), meters = c(7.24497992499657, 4.87741163537199,
9.08560044628181, 80.6842320881314, 238.606484922097, 157.204921816723,
625.23872908032, 219.35778781259, 12.6588736944506, 93.8090439559674,
319.445131807673, 67.8036768396769, 804.804836152127, 109.434600933436,
129.949236899749, 105.911149760734, 27.9531918089091, 11.27836453714,
457.093853355937, 26.5240927781247, 19.7015020304213, 14.3532653640863,
1.25853679670009, 0.150718694512225, 1.70366003911483, 2.63870002711148,
127.037462401145, 961.452700995197, 215.04628486518, 48.3476802703997,
56.4299311045402, 71.0567210386123, 53.2157129067539, 80.4040760406296,
236.078682140782, 406.948035573002, 92.6423364709784, 403.797511366086,
323.858212895809, 65.9783289318472, 26.7161400634748, 21.4406886404941,
44.6906704150594, 36.0784092780547, 66.4678272178005, 68.0358199816987,
2.1476323514823, 3.01587341033808, 1.57380761082474, 1.71653324348141,
18.8397076847765, 184.268772826548, 61.2103183204004, 82.9010640232318,
43.7120771884048, 40.4214303580113, 220.354835462908, 77.5844706628055,
10.6522275628958, 64.6401569172547, 170.237028243589, 235.781539666942,
206.150503465281, 25.3213069661311, 36.7436253838348, 9.83110790227874,
23.3459053606757, 3.45271958972457, 1.96114320043511, 20.4049146593214,
15.2372682099889, 20.3543121890185, 42.7350584816069, 12.1313207862892,
1.11708614676525, 191.836648404227, 33.3046462595366, 166.168666618136,
31.1722631768611, 133.717766242875, 12.0334817161546, 62.2359071313657,
16.7484729490856, 109.549479467076, 438.080739581294, 37.0971614841641,
105.391252306762, 122.494788370234, 88.6622245013997, 24.3191344096727,
5.117649955497, 51.9358625225939, 47.9478783281661, 6.96463276369705,
1.75025309899143, 31.176657161161, 10.1169843733554, 26.5346636683759,
15.9584899969855, 337.838831129694, 59.7693703670957, 46.7853809521572,
16.799710673628, 39.1979373391332, 122.408881979713, 266.855999717221,
63.8055787186155, 57.9900269187913, 120.78876572575, 82.1213040340665,
105.298734249817, 161.923229191297, 28.9509612131438, 0.248722765246352,
6.42826019283635, 4.80096922046293, 7.66924438494585, 3.77931970556652,
6.16226345339552, 1.89180927192504, 2.92660299028088, 4.47513027348909,
5.3772236196912, 258.79885256986, 76.3673624568927, 227.248769639605,
119.571707120552, 35.7102849958032, 36.9949248244319, 137.90048603805,
96.6658682838857, 259.080913058415, 105.606050276669, 56.1002922989478,
85.2381765021222, 191.363093870704, 55.7981801107081, 12.9578924739909,
26.3419895578265, 14.4503596334286, 15.6675803413194, 21.9669267962415,
63.1276880372023, 5.54867147176836, 9.0179124542279, 7.13599657582419,
69.6648263961824, 352.989183299746, 263.287397250075, 253.766882591523,
209.967849272818, 73.9692977527144, 98.0159993160327, 170.190795021595,
282.190504225449, 78.6666650047386, 27.0630775295066, 332.829084995611,
194.938072897224, 102.422860453484, 17.7992858642505, 13.1266890679012,
4.58091256610204, 6.40555894626406, 2.66715489350561, 19.248878078399,
14.0807810821772, 4.57816759344819, 4.40196859830686, 10.7329317290172,
32.4528952520776, 138.596548507858, 125.547606032588, 46.3652014291144,
16.3797234392651, 10.249071010749, 248.440266699442, 304.347056271548,
154.412296810916, 46.8081932028809, 226.453483692211, 431.805061221221,
111.437754042661, 217.641929376792, 25.1923986792615, 12.2256823484931,
12.2949586884092, 31.0958526630604, 85.5575841303107, 22.7975660566324,
30.5216893316272, 35.1775681936213, 9.50846937534727, 9.76657486076715,
0.579469646956765, 266.224607309967, 188.727073099707, 292.559096086872,
9.49743703683714, 107.113753739463, 175.681846441223, 19.379648871926,
88.2778253322274, 410.496903513497, 8.97162022276979, 32.4619475881012,
73.646386222969, 75.348171202073, 90.8515841171699, 10.6200903372279,
3.02379387011622, 32.825022046837, 65.550868227495, 24.9833819842075,
77.5493346217115, 2.10544392843427, 2.32222002989636, 3.12605565461408,
1.02518236594501, 341.46710436094, 151.588096225148, 353.933570258634,
124.173972566209, 60.4110080957218, 38.5295043269143, 154.717374816579,
10.642332114307, 112.19511336859, 178.656934678561, 144.883837500965,
193.991868696415, 202.99316836535, 77.6189915466929, 0.871460936515423,
1.63576829944789, 47.5439446635587, 60.241399209101, 92.7059630247652,
1.71653312232677, 3.28998417221502, 16.9888823353554, 1.073227079111,
31.3529682130551, 98.2633746496518, 146.311948071212, 277.215271024987,
30.6004645511119, 49.4907657584358, 17.6377880041836, 517.661457540348,
581.555783536356, 1010.85341607138, 101.36421835411, 101.587448595859,
144.303729077564, 91.3938747436922, 149.518556866971, 36.3308699793953,
7.80121835979054, 23.0312990229266, 13.41048184825, 20.339107047676,
3.08847373655867, 31.7536206163432, 80.5523050297356, 5.57519986215111,
12.7301911126705, 265.400347490029, 96.389278202961, 96.4450196328944,
269.701595926116, 40.1994744716222, 185.194247845766, 132.799182823423,
92.6508846479433, 31.7196753780259, 82.6725380176083, 149.907487149117,
259.995942351777, 136.962271891916, 47.7342981878729, 28.0369643012698,
23.5176540297538, 85.9823208879668, 69.1793641133218, 2.10460736024825,
2.47507980743031, 1.46820616137708, 8.50065507425538, 9.43358037894557,
15.0643556352927, 160.034358372113, 401.192221112903, 208.507212166668,
16.9012427928657, 70.1561153179486, 282.055943502233, 95.7582280566781,
20.4921115795782, 224.297864971227, 248.751359316637, 63.3008262529409,
202.381548954774, 160.240208598145, 89.2596850671307, 2.41266014760612,
2.24662537954621, 92.0812846530431, 64.0782727558696, 102.539355421441,
133.192603215476, 2.19161459176181, 2.71657087565203, 2.60259248593429,
9.95223133490391, 175.102558714441, 102.128569321102, 45.1350310564478,
60.7860248161304, 166.511239966959, 32.3622524770883, 38.1126859517567,
169.914906248272, 165.51479143087, 21.6290787183546, 154.863792200668,
224.650919723327, 172.786068029272, 41.6201741515014, 40.966552071361,
60.9998953906058, 4.00012706993277, 79.9578066806101, 183.917814759389,
103.086558986388, 6.96826209073272, 5.74403906883466, 5.4856515067938,
28.6736690417882, 238.403484773501, 231.70110714268, 126.348996131178,
61.4905557699149, 104.389974082626, 246.69389506543, 79.3069202652704,
24.117595869327, 48.4779179700019, 69.4483313003939, 127.606317513607,
78.8710394107804, 98.1528155665254, 128.061282053331, 3.19606373207204,
1.87066709355931, 30.3658567894746, 67.1163251638405, 32.6323314265454,
0.228514489291685, 2.59419308146204, 6.96463324671082, 31.4857435059086,
32.2152666766542, 219.54173457463, 100.503943180343, 71.9061154834901,
91.2830509779235, 155.03560958018, 98.391102232677, 27.4736388446992,
34.7344995015586, 85.1266347031687, 74.6245520597207, 24.0060703654787,
139.030754853487, 171.244448038257, 112.193936557097, 2.39299360914121,
19.4583131438491, 58.7443921590234, 14.0595780932243, 216.575414578798,
127.459683665046, 26.4468118443774, 15.7904069541748, 3.42889322639363,
18.9364897049987, 137.67183581274, 122.967226389734, 119.894430382828,
104.442282446888, 190.221376118256, 131.941577184786, 353.399746658368,
448.477151206068, 133.358287719838, 261.649707603195, 81.4006720251283,
343.002058701936, 163.91259720329, 197.994167334045, 7.30944634184061,
7.26330302571758, 32.2642168570983, 330.892281390864, 76.9551034586096,
16.5345940654105, 93.4833973060589, 2.44622725450917, 1.07860556492395,
1.93778399725422, 77.9570596409594, 94.0913633507909, 56.7576348472931,
409.330409688539, 51.8605115857434, 101.399915620214, 186.284262562234,
150.206902386026, 73.7756320461831, 29.7407716653824, 148.98703547435,
220.790713913921, 244.515597043242, 18.6165511888937, 9.90234122916165,
33.2562502415159, 156.414444934157, 13.9779124860658, 48.9122633130083,
170.372846084158, 157.591584502432, 41.3319249226387, 14.1513887931616,
6.44142678100409, 228.471931226893, 110.023055666621, 33.5052868559644,
173.194133068492, 32.3931156891464, 44.5888695638585, 57.8480536590698,
130.274156166872, 79.3730952009515, 46.5247317494093, 113.821030825373,
345.300064595988, 152.140595169695, 17.0421460982582, 6.84417297878845,
12.5696620896434, 36.6545290246341, 74.6452657675716, 217.14457420751,
165.496335573275, 22.3871316935213, 6.61421665015, 20.0410769731539,
23.7057126539467, 168.517094664878, 110.986727962072, 83.3281747496762,
7.35167504947444, 76.5528141698817, 20.6384141732761, 87.00310582216,
402.411224410847, 145.210679361704, 55.1206401339897, 446.103457643039,
95.317801637148, 198.306682822754, 88.7652010770343, 4.4779529467687,
55.2357786872407, 118.400174413319, 163.550512253059, 103.789889510405,
70.1485296476271, 44.9031868790507, 5.42285572703366, 23.2710355323781,
7.96212769344129, 37.560076557467, 210.670533114753, 104.544578996089,
438.121243591053, 56.4263114090557, 30.3428605030646, 102.704223497357,
88.0554172082872, 29.8261947342531, 21.3578133423672, 125.139532314134,
199.2412154636, 423.415414756748, 155.583267038193, 2.14393350563694,
2.77638044593597, 25.6375785864043, 176.271312482445, 188.095709294767,
162.049988299195, 28.6407159601821, 341.238744680548, 6.70617205440293,
0.685237342195351, 72.5497248411768, 411.366138460536, 14.570194300977,
35.8331305489166, 336.776755084208, 43.10843602833, 343.590748922672,
306.997839886018, 110.223009494854, 246.067728815614, 229.160642943454,
80.1932202086262, 223.436937319274, 7.33591020042729, 3.91210855110157,
0.301852508403949, 1.9831582085811, 100.093808999808, 136.307291596312,
56.0971664553408, 35.91142300096, 35.9638499452433, 2.71553679684771,
4.6621428025371, 140.593157625054, 274.807479865085, 221.786077846005,
61.483885141769, 20.3881339787884, 30.7758272593722, 96.0458882470437,
246.919746334924, 22.0033859138399, 198.28605047425, 103.814293419658,
46.5348985729046, 29.182847412964, 75.8648063336849, 13.8241139461049,
17.1286557911254, 88.1810161018373, 3.36013813866121, 69.639752829193,
677.723130883346, 41.0286431704323, 73.2159389655071, 2.97198914835809,
2.2955645498568, 77.4338889708046, 165.144080335453, 28.249849842644,
697.335948561217, 26.764915418294, 14.2190768683659, 91.7637857701146,
27.5440244171723, 16.8445374971489, 23.8566496302873, 0.981943140947041,
78.5997636834095, 162.138462101107, 44.1672067123073, 1.57379999898296,
4.52584675687701, 0.97658119252377, 0.477360675618112, 129.151103972441,
70.8307163818214, 275.971859788928, 127.881236082799, 1.170287338146,
0.866454371283992, 434.919703422169, 93.8451377376139, 207.10904118958,
46.8316256828644, 150.387134794503, 278.399451505872, 198.814569340003,
115.184928188408, 36.753170014185, 129.106822541989, 168.482550085438,
92.1323337766019, 250.394018594269, 37.1881210650176, 26.0619948566024,
2.1015758585879, 1.9337619910658, 2.5374401085012, 6.88084629859044,
240.364952743281, 23.3347433113824, 12.8301991435217, 104.664097883855,
11.9543330584122, 299.693093901171, 457.205452556256, 166.486441167246,
479.147896086039, 601.250116553193, 324.328442697521, 329.307886840488,
231.36130846456, 34.9248512789383, 159.724908476382, 310.307623928807,
665.667745992218, 440.34793375254, 47.0987434639045, 3.27176941323539,
9.70137304643561, 10.0607743796965, 3.08631438745061, 85.9070751173181,
114.552594829497, 56.4422079169895, 72.8598000828185, 49.5713482843566,
2.63222698246548, 278.660159682918, 374.155025716734, 614.896477070897,
84.7023024801914, 112.319999024275, 18.5987593461749, 82.9077768700278,
154.845742871174, 125.567795777075, 66.4893506450749, 126.741063662877,
82.2411837719443, 756.335890510717, 73.1151790189073, 3.5922959646701,
8.41573329417288, 4.41473763601453, 2.12491629471561, 57.10162180489,
51.9326111578832, 58.8698849597487, 64.1069702907545, 25.653260586019,
2.25452824419408, 133.78927961757, 341.7548293499, 14.113318950603,
64.7040755111393, 74.5271989167769, 407.725534601351, 309.316524308558,
20.2280966869265, 23.8884632436018, 20.0051667649045, 23.3715363806949,
21.8895053097727, 284.299801015909, 133.058636731235, 9.13435639512076,
8.93531290420054, 6.97575634977357, 38.5847487365879, 322.899303421944,
7.43662008052574, 31.3472739232612, 90.172402886085, 13.1780473878919,
11.8113106256799, 95.4868454357865, 111.151536039587, 62.3434590358668,
25.3913623754508, 152.028407407367, 140.924105429548, 110.376776160796,
21.9269046506022, 282.56001268775, 26.9210719144184, 88.3343050027196,
291.612562587322, 164.906755082596, 116.426543798048, 16.3087551310383,
6.52751999940019, 9.01631759743765, 16.1907026689521, 16.5315572289726,
1.88226712179479, 18.0388366074334, 48.3907627589146, 1.49068315465064,
9.44594654212787, 730.702774263893)), row.names = c(NA, -700L
), class = c("data.table", "data.frame"), .internal.selfref = <pointer: 0x0000000002641ef0>)
```
Your meters field might have NA values.
Hence adding na.rm = T to mean and sd functions will solve this.
So, I had to change the name of the rows to calculate the Anova. Now I'd like to bring back the previous names of the rows. Is there any way to do it ? Data:
head(tbl_reo)
id Sequence variable value pv
75 AAAAGAAAVANQGKK BiotinControl1 3893050.50 0.8523174
192 AAAAGAAAVANQGKK BiotinControl2 900604.61 0.8523174
3770 AAFTKLDQVWGSE BiotinControl3 90008.14 0.8523174
934 AAIKFIKFINPKINDGE BiotinTreatment1 656399.20 0.8523174
1012 AAIKFIKFINPKINDGE BiotinTreatment2 359937.85 0.8523174
1970 AAIKFIKFINPKINDGE BiotinTreatment3 447089.35 0.8523174
Code:
levels(tbl_reo$variable) <- c("Control","Control","Control","Treat","Treat","Treat")
New data:
head(tbl_reo)
id Sequence variable value pv
75 AAAAGAAAVANQGKK Control 893050.50 0.8523174
192 AAAAGAAAVANQGKK Control 900604.61 0.8523174
3770 AAFTKLDQVWGSE Control 90008.14 0.8523174
934 AAIKFIKFINPKINDGE Treat 656399.20 0.8523174
1012 AAIKFIKFINPKINDGE Treat 359937.85 0.8523174
1970 AAIKFIKFINPKINDGE Treat 447089.35 0.8523174
No idea if it's necessary to use dput on such big data, but here you go.
> dput(head(tbl_reo,4))
structure(list(id = c(75L, 192L, 3770L, 934L), Sequence = structure(c(1L,
1L, 3L, 5L), .Label = c("AAAAGAAAVANQGKK", "AAANILFSDHAD", "AAFTKLDQVWGSE",
"AAIELRE", "AAIKFIKFINPKINDGE", "AAIYKLLKSHFRNE", "AAKKFEE",
"AAKYFRE", "AANVKKTLVE", "AARAGELLKE", "AARDSKSPIILQTSNGGAAYFAGKGISNE",
"AAVKARVASIDE", "AAVKASAPGSVILLE", "AEKLKAE", "AEQVKKE", "AFAKRQGKE",
"AFGSGTAAVVSPIKE", "AGIPAGVVNILPGSGRVVGE", "AGISKDGQTRE", "AGSHGKDAWGVFRVHAFE",
"AHSFSSSLASAE", "AIDALNGMLLNGQE", "AITYSWTLLTE", "AKAKKAAKKAANAKQQQE",
"AKALVAQGVKFIAE", "AKAQGVAVQLKRQPAQPRE", "AKIGKKVE", "AKKVVKKAFEE",
"AKNKKYALDIIKE", "ALANAGVTDIVLAVNYRPE", "ALDFFARGLVKSPIKVVGLSTLPE",
"ALFHPSVLGLE", "ALKIWKRFRE", "ALKPDSQKSYAE", "ALLLKVNQIGTLSE",
"ALRIGSE", "ALRLVE", "AMRIGSE", "ANIIKLVE", "ANNKWNKLFSE", "ANVTGLRDAMFKGE",
"AQKVRDQITSLKE", "AQRVQAKNQLE", "ARINFGIEKAKE", "ASAGIQLSPKFVKLVSWYDNE",
"ASFVLPTWAAKE", "ASKLAAYNKKSTISARE", "ATSSIVMFSLNE", "ATTNAPWYKGWEKE",
"ATVGAGLPIISFLRE", "AVDATHLAE", "AVIRLSKE", "AVSKVYARSVYDSRGNPTVE",
"AVVTVPAYFNDSQRQATKD", "AVWYGPPKAANLGGVAVSGLE", "AWFPYQKE", "AYSPFGSANAPLLKE",
"DGWVPGKNLFTVE", "DHSFINYKQNVE", "DILYKIYKGVSE", "DLYQTFARTVE",
"DNVKAHPRIE", "DQVRNYVMQYIQE", "DSVYLAKLAE", "DVHNLFTYAKE", "DVKISAGTLLKGTE",
"DVQKFRHE", "EAVAKAAE", "EKPLFLVFHGGSGSTVQE", "EQRPGTPLFTVKAYLPVNE",
"ERIAALE", "FAKSLPRLDGLSVQE", "FALKHFPDYE", "FAPYGTITSAKVMRTE",
"FASLFPLKQAPAFLGPKGLKLTE", "FEQKNAGGVGE", "FFIDRPE", "FFIRDTKNLE",
"FGINTTVQE", "FGNRPMILHQIE", "FGVTKARWPAKSVKFVQGLLQNAAANAE",
"FIFSKYQILE", "FKMAKPE", "FKSMIKNNE", "FKTKYNSDPYQLE", "FLAADKE",
"FLKKILVDNKLE", "FLLSYGKE", "FMIAPTGAKTFAE", "FMISQLGLQKKNIKIHGF",
"FNRGLALE", "FNSQPDYRE", "FQKDAKRFE", "FQKTGPFE", "FRNGMINVSPIGRNASTEE",
"FRTASAQLE", "FSGSLLRSKFNTSNE", "FSRWFNHIASKADE", "FSTNVKDE",
"FTADGKVKPE", "FTPETPSPLIGILE", "FVADGLLQGFGNE", "FVAYPIQLLVTKE",
"FVAYPIQLVVTKE", "FVDIINSRN", "FVSSKHGSVSAE", "FYKSLKLPYRIVGIVSGE",
"GAAPGGFPGGAPPAPE", "GAIWNINSFDQWGVE", "GARYGPSLMPGGSEE", "GEKTMGAKITKSLE",
"GGLGPINIPLLADTNHSLSRD", "GGTLIGTARSME", "GGVAPNIQTAEE", "GGVIIITHSAE",
"GIFSGTLSYIFNE", "GIKVPIHIVQE", "GILQRWTKGFDIPNIE", "GILQRWTKGFDIPNVE",
"GILVASPFVELE", "GIPAGWQGLDNGPE", "GIPPDQQRLIFAGKQLE", "GISKKTRIAGVVYHPSNNE",
"GKKIATYQE", "GKLKGVLGYTE", "GLDKIFQE", "GLGWGNNASAAIQRVGLGE",
"GLNHLPVQKQIVE", "GMMANGIAAGGQLTTTTE", "GMRWAGNANE", "GNDIHALAAKLLQE",
"GQALKKKKGKSAE", "GRGINSSYAVWNDVTGKAHE", "GRHSGYGKRKGTRE", "GSDVLNTWKKE",
"GSRKVDGQKVKASKE", "GTAVSQADVTVFKAFQSAYPE", "GTERSAYYTWAAE",
"GTRAVTKYSSSTQA", "GVVLGVEKRATSPLLE", "GWGTPHIKPYGNLSLDPSACVFHYAFE",
"GYSGVEVRVTPTKTE", "GYVGRTQPKKGGEGE", "GYWNGKITVDE", "HDHAGVPLKISPPVVAYRE",
"HIIQAKADAQRE", "HIVPGTYIQE", "HKFAIPAINVTSSSTAVAALE", "HKVVNGNSADAAYAQVE",
"HLQPHFTTNDGLE", "HNLRVISE", "HQIRAKFVE", "HQKYTREQVGCKE", "IAKLNIPTGIPLVFE",
"IAQHIFTKLNSNGYLEE", "IDASKPVKLTLLISE", "IDPINALQAAME", "IDVAWLKANAKE",
"IEAISSPLMGIFE", "IFDANVQRLKE", "IFFKIKKTTPLRRLME", "IFGGYLYFAQAPSAAE",
"IFGGYLYFAQAPSAAEFHTE", "IFGPVVTVAKFKTLEE", "IFGPVVTVTKFKSADE",
"IFLHSLPVKE", "IFSTYADNQPGVLIQVFE", "IGATTSVFPFNKSMIEYLE", "IGNSGMFRPEMLE",
"IGSLTRQGAKGGLLE", "IHPLLPQDE", "IIAGNVATRE", "IIGGTTRIPTLKQSISE",
"IIKKNFDLRPGVLVKE", "IISNAKGQVVGSIIALDRQE", "IKGFFSFATQKLDE",
"IKHLPFNVVNKDGKPAVE", "IKKVVKAAAE", "IKLFNKWSFEE", "IKLVKLIQE",
"ILIVTKDGVRKE", "ILKIVPGRVSTE", "ILKKLDE", "ILLARNLI", "ILNKLALRILKNE",
"ILNSQAPEE", "ILSKLASAGATE", "ILWRQKE", "IMLPVFDAPQNLVE", "IMLQLGIPREE",
"IMLWNLAAKKAMYTLSAQDE", "INLPFITADASGPKHINMKFSRAQFE", "INLWFKKEE",
"IQLNGGSISE", "IQPRANIQLDFPE", "IRVFQGE", "ISAMVLTKMKE", "ISDTMWPGQAMTLKVE",
"ISDVFAKWNNGVLD", "ISLAAFGRKE", "ISTMIRWGLKPYLFVLNNDGYTIE", "ITDIKQFLE",
"ITHPTIVDGWFRE", "ITLGKYLFE", "ITQLMSLIINTVYSNKE", "ITVDAPKAHE",
"ITYLNNRAAAEYE", "IVERLNTASIPE", "IVFASPPRKSDGKVSPE", "IVFNMSREE",
"IVNLTLPDGTVRQGQVLE", "IVPKLME", "IVRVNKNAPAVE", "IVSRFKTE",
"IYEKME", "IYFSLNNGVRIPALGLGTANPHEKLAE", "IYNHIQLRE", "IYNHIQLREE",
"IYPYGSRGPKGLKE", "KAAKVTKAAQKAAKK", "KAALQTYLPKIKE", "KAEQVFQNVKNILAE",
"KAITYSHAAKE", "KAKIGQKE", "KAKKANNPQHSITKDE", "KALTYTPPKKQKAEKPKAE",
"KAQRAPLEE", "KAVAYWKTLKTDE", "KDFATFAKE", "KDYASVVPPRHNE", "KEKLTQQKKE",
"KFAAGTKALLDE", "KFINSEIE", "KFNAVPIFLSDE", "KFSERLLNE", "KGAQTYVKKVIGSFKDWE",
"KGCDIIVKNHE", "KGLLSATQFTQPALTLME", "KGLSKKGGNIPMIPGWVMDFPTGKE",
"KGQIVGRYVVDTSK", "KGTGKSNKITITNDKGRLSKE", "KGVFRSIVPSGASTGVHE",
"KGVFRSIVPSGASTGVHEALE", "KGVITTQAE", "KGWVPVTKLGRLVKAGKITTIEE",
"KIFTVPTETLQAVTKHFISE", "KIGDLNFLIGPKLYE", "KKAADALLLKVNQIGTLSE",
"KKAGKTLDVVE", "KKAPAAAPAASKKKEE", "KKIDLASIRE", "KKPKTKKVKEE",
"KKQAIRSKQE", "KKTISLKTPLKTLVILHSDE", "KKVYPDVLYTSKLSRAIQTANIALE",
"KKYIATIGVE", "KLAAQRKAE", "KLIHGPKAQYNE", "KLIHNDSSYNHE", "KLKAAYSYMFDSLRE",
"KLKAERE", "KLKKVLSANTNAPFSVE", "KLSGIANNRDE", "KLVAVLK", "KLYVGRAQKKNE",
"KMIKPKEGRIE", "KMSSGYYLGE", "KMSTRAAPFEQRLPE", "KNLFTGWVDVKLSAKGQQE",
"KNLKPLAIIKGWGE", "KNMDAATALVGSGPAFVLLMLE", "KNVPLYQHLAD", "KQLYSFDLE",
"KQNLLAVE", "KRVSGMFLGE", "KSPFLDALKAKNFE", "KTFVNVAKPFHKE",
"KTKLQGMLNKAEE", "KTMGAKITKSLE", "KTQAFKKHVDE", "KTVRKHLERQGWIE",
"KVFNAYPAARE", "KVGLRLSPYGVFNSMSGGAE", "KVILKMKE", "KVIRFQEE",
"KVSVLKALGAE", "KYFPGLLRATNE", "KYSLAPVAKE", "LAKKQKKLE", "LDALIAQGRE",
"LDASNKAAKE", "LDLARPIYLPTASYGHFTNQE", "LDTAQKHID", "LDTIRNME",
"LEARIPE", "LFAKFGPIVSASLE", "LFAKHGE", "LFDTHRVIVNE", "LFLKQLVVGGLDRVYE",
"LFRSIGGE", "LGAVALKGALAKVPE", "LGAVNLHE", "LGDKAVYAGE", "LGDNAVFAGE",
"LGGEKKQKGQALQF", "LGGKSPNIVFADAE", "LGGTVVSLSDSKGCIISE", "LGILPRDILTKE",
"LGIYSHE", "LGKGSFKYAWVLD", "LGKVLAKVIGKE", "LGMLAGADRVE", "LGTPFGVTIDFE",
"LHGNAKKAAEE", "LICSYRSKIETE", "LIGGSADLTPSNLTRWKE", "LIHQNEVPLVLLSSGVGVTPLLAMLE",
"LIHSKVGGE", "LIKLTGKLIE", "LILNGGFSPLTGFLNE", "LINNLGTIAKSGTKAFME",
"LKADLRPLQIKSIRE", "LKAHNINVVDK", "LKAQSKPHVGDE", "LKHLVGPEKAAE",
"LKIQRPLHE", "LKKKGILFVGSGVSGGEE", "LKKQKTAE", "LKKQQKEAE", "LKKSANVGKKKE",
"LKPTVILKLLKE", "LKRAIDLNKE", "LKRIMINCFNE", "LKRIPE", "LKTNGKFQVDKSIIE",
"LKYFGKALE", "LLAAFKAYLE", "LLAVPVVKGRKTEKE", "LLAYQFASPVRWIE",
"LLESPNNKVVPATNQIE", "LLKTNRISNE", "LLKTNRISNEQYE", "LLLLDVAPLSLGIE",
"LLLQQRATE", "LLRLVLLE", "LMAKLANDSPLAIE", "LNAATGSKTSLYDKKE",
"LNAAYAADGYARIKGMSCIITTFGVGE", "LNKGLTKKGGNIPMIPGWVMEFPTGKE",
"LNNAAAKKYDLE", "LNQLLKLVSE", "LPAWSKLQKIYE", "LPGVAFLSEKK",
"LPKNSTSSKDKKKKN", "LQAQLDYLNAE", "LQDIANPIMSKLYQAGGAPGGAAGGAPGGFPGGAPPAPE",
"LQGKLTGMAFRVPTVD", "LQGKLTGMAFRVPTVDVSVVD", "LRPLQFKSIRE", "LRQATGGQAFPQMVFD",
"LSALNGIAGSYAE", "LSFALIHKE", "LSFPFEWAFAGTNE", "LSGIPPAPRGVPQIE",
"LSKISGVDSSLIFPALE", "LSKSKTSPYVLPVPFLNVLNGGSHAGGALALQE", "LSLLFNVIPDRYTKYD",
"LSNVINMFFE", "LSQGTWLNKPKSVFQE", "LSRIGEFE", "LTQFPAFVTPMGKGSIDE",
"LTQLKKE", "LTSLTDYVTRMPE", "LTVKLNKE", "LVARVQGGEE", "LVFGQTFTDHMLTIPWSAKE",
"LVGRINGQFGTVE", "LVILGDSNVVRE", "LVKVGHDNLVGE", "LVRDNKLIGNFTLAGIPPAPKGVPQIE",
"LVRFSYGQDLE", "LVSLPNIILTPHIGGSTEE", "LVTAPLDGTILE", "LYGNIVMSGGTTMFPGIAE",
"LYGTAIGARSQGAKTYLE", "LYPGRPLAIALD", "LYPGRPLAIALDTKGPE", "LYSTSSSSTSSSATKN",
"MATLYDGLE", "MAVAIKKE", "MAVKFGKNAF", "MFFVSKVMNNE", "MFNDFLNAGAE",
"MGQKKAPDGRIVE", "MIGSVVGIYNGKAFNQVE", "MIGSVVGIYNGKAFNQVEIRPE",
"MIISSPSDGQVKE", "MIVLHLPSPVTAQAYRAE", "MKPTSIEKE", "MLAQDKLVAE",
"MLGHYLGE", "MLGNWSFGDYFKKE", "MLNRISPKILDE", "MLRAAGKE", "MNNIIAASRRH",
"MPPQIPNE", "MQTAAQSSSIE", "MQTEIKE", "NAHLKKNFKPQGSIE", "NALKLAKWLE",
"NAVDRLLVE", "NFAPFLKTILPE", "NFIQSIME", "NGFINNPIVISPTTTVGE",
"NGHSPSEAFNE", "NGITFPKDAPSPFIFKTLE", "NGIVTYAAKE", "NGLLSFVQYVIAPIQE",
"NGLTAYRLGKE", "NGSFLLYIDRHLVHE", "NGTVTAANASPINDGAAAVILVSE",
"NGVAKGSFKD", "NISNNYMIGAINAE", "NKERILTE", "NKIIRMPLVE", "NKIVRKPLME",
"NKKVIITGAPAAFSPTCTVSHIPGYINYLDE", "NKVQYIAGARPWTHVQKVDIALPCATQNE",
"NKVSPADAAKKAL", "NLHILE", "NLKDTSSGGVTHANE", "NLKKGSTVTSNGLNWE",
"NLKPSKPSYYLDPE", "NLLPLQSGIGNIANAVIE", "NLTVNPNVNE", "NMKLKLIEPLRE",
"NNIFNMVVE", "NNIFNMVVEIPRWTNAKLE", "NNMLHGNTMTVTGDTLAE", "NNYKKRLLGTAFKSSPFGGSSHAKGIVLE",
"NQGLKTATYPYWANE", "NQQGVNNFDE", "NRGIKVANPVWSTIPFISE", "NRKISAVSTYFE",
"NRNVGKTLVNKSTGLKNASDALKGRVVE", "NRNVGKTLVNKSTGLKSASDALKGRVVE",
"NRVKSDMLKE", "NSLLSSGTSQDSLRE", "NTQLMNRDNIE", "NTSLSPKFVYQGE",
"NVKTDSRNMPVKE", "NVQLYNGFVFHTGSLEE", "NVQNGEVRFE", "NVRDKGNSALLE",
"NVSSNIVKNAE", "NYNLLDTSGVAKVIE", "NYTVERVNE", "PKLVLVRHGQSE",
"PKLVLVRHGQSEWNE", "QAKLTAATNAKQ", "QAVGGIYSVLNKKRGQVVSE", "QDKKKKSNH",
"QDPSKSKVVVFE", "QDVPLIVPVVNPE", "QGAQVLFASTDSE", "QGKPYISLPKGKGIKLSIAEE",
"QGLKIDGPGFE", "QHPRYGGVYVGTLSKPE", "QHPRYGGVYVGTLSKPEVKE", "QISSMVLGKMKE",
"QIVYALKLPGIIHIDAAE", "QLADYLIGVQY", "QLASQLVDLKKE", "QLGIHYE",
"QLYKNDSNNNNNNNGNNAE", "QQGKNATVSVEE", "QRPGTPLFTVKAYLPVNE",
"QRTKVEHVRE", "QSPRPGQQAFE", "QSPYVSWVSYPGLASHSHHE", "QSTKFGTEIITE",
"QTYKKPTGGIVTVRSE", "QVADISSAKVNFKSLE", "QVAKWVNLAQKE", "RAVPHGKWQDE",
"RDLIKKKTKNNE", "RFLNVFPKLVEE", "RGEIKKGE", "RGLPVKLTYTDNKTSKE",
"RHIQVGDGLE", "RLAIVGVE", "RLLWYLARE", "RLNTASIPE", "RLNTASIPENVE",
"RLTSLNVVAGSDLRRTSIIGTIGPKTNNPE", "RLVAIAEQD", "RMHVLKKQYE",
"RNAAYQKE", "RNAAYQKEYE", "RNKIHQYLFQE", "RQLNAVLE", "RQLNAVLEE",
"RTSLFLNLANDPTIE", "RTVLFPIKYHE", "RVKANAAKRAE", "RYKLVPGIFADVKNLKE",
"RYKYVDPNVLPE", "RYVFLLDPMLATGGSAIMATE", "SALSYAALILADSE", "SCKMPQTVE",
"SDKSKWLTGVE", "SEYWPRLTKE", "SFAANWGVMVSHRSGETE", "SFQAVYNKLTGKQIVFE",
"SGSKLKFYVLHGDGVE", "SGTLGTKGNTQVIIPRLTE", "SGTVFDSSYSRGSPIAFE",
"SHIGVAKKLE", "SHLIPSATTGE", "SIAVLSAMKME", "SIAYSLKNTISE", "SIQKTKE",
"SIRVGEYNAE", "SISDSLSSKPHNFE", "SKFAKAYAQGVSKKE", "SKFKGDITWLPVRRKAYWE",
"SKLPTYTAKDSAVATRKLSE", "SLDQAWSLLRIYPKE", "SLGSPSGATKARIVVAKSGEL",
"SLIDAKTGLPKE", "SLKTGNAGPRPACGVIGLTN", "SLQNKGQEVKE", "SLRGLGGILLNPITGRRFVNE",
"SLSSKLSVQD", "SNLKKITLE", "SNPTAKLNLIWPATPIHIKKYE", "SQGKTLSVKQE",
"SQLTNLFNEE", "SQRIASKNQLE", "SRFQEIVKE", "SRKLFAATVAKAKTIVWNGPPGVFE",
"SSANRKIVKE", "STKNGTETKRSLE", "STPDTPSPLIAVNE", "STVAGFLVGSE",
"STVLQFKE", "SVKLTKAVAE", "SVLAHL", "SYQKSQKSQKE", "SYVDKHPVVTFNQE",
"TAGLTVGDPVLRTGKPLSVE", "TAIGPSGQLKGYLRPE", "TAKGNYPINAVTTMAE",
"TAQGQFLNFNKLLE", "TARSTATGPSEAVWYGPPKAANLGGVAVSGLE", "TDPFKLSGAQVVD",
"TEPLGTAGPLKLAE", "TFKLFNKYRPE", "TFRTTNTL", "TGGPISVPVGRE",
"TGIVAQYAYVLGELE", "TGVIKPGMVVTFAPAGVTTE", "THINLKVSDGSSE", "TIGNPKYNVPDFE",
"TIQDKSSAGAVVVANAKSLE", "TKAGVVKGKTLLE", "TKKSCCSGK", "TKNFTPEQISSMVLGKMKE",
"TKTFSPQE", "TKYLSGIAKRLNKE", "TLKKFGEE", "TLKQLNASLADKSYIE",
"TLKVVDPE", "TLRKVVKHFIDE", "TMKAVVIE", "TMWDTKKE", "TNPGTDVTVSSVE",
"TQALLLAPIAPHFAE", "TQKGVIFYE", "TRLSLTHMVE", "TSGSTVNDPLANYE",
"TSNFIKKVGYNPKTVPFVPISGWNGDNMIE", "TSSKKPKHPLE", "TTAMITDIATAPAE",
"TTHIKFASDPGCAFTKSIGFE", "TTTGVHHLYRMVKE", "TVAASAVAAVFE", "TVAKSKNAE",
"TVFAGQKP", "TVLRQALGE", "TVQVNLPVSLE", "TVSKMAYLDKTGE", "VAAIMQDPVMQSILQQAQQNPAALQE",
"VAALAAENK", "VAKVVGANPAAIKQAIAANA", "VANPIMSKLYQAGGAPE", "VARVILTQVGSGPQETNE",
"VATRAKQGELLE", "VDASGFRIPQQE", "VDSVLKHMKE", "VEGMRWAGNANE",
"VFIDFTKE", "VFKFFGFTPE", "VFKFFGFTPEGVAE", "VFLNEHPE", "VFVATKE",
"VGAKGVQLLSSYITEE", "VGASMTRSIQTLE", "VGKSVAVDSSE", "VGLKRVVTKAMSSR",
"VGTMNVFFVFLNKVTGKKE", "VGVHVLPKILDE", "VHFVSNIDGTHIAE", "VIAGNVVTRE",
"VIDTILALVKD", "VKILNGFAFVE", "VKVVLFNHSQRD", "VLANYLTSALSE",
"VLAVQKKLIAKSNLAGKPVICATQMLE", "VLGPFAFRIGSVKE", "VLIKRGVKPE",
"VLLLDVTPLSLGIE", "VLLVAVGRRPYIAGLGAE", "VLNPQIIKDVLE", "VLPRAVGSLTFDE",
"VLVLRGTLE", "VLVVRGSKKGQE", "VLYTSKLSRAIQTANIALE", "VMSIGRTFEE",
"VMTKNPVTGIKGITLKE", "VQNSTLAQLTSKLIPE", "VQSAVLGFPRIGPNRE",
"VRVTPTKTE", "VSAAYKNSLE", "VSDVAQKAE", "VSGLQYIDLLLIHSPLE",
"VSNPNIIFFRGTYAAVSPE", "VSNPPAYGAKIVAKLLETPE", "VSNRSTPSVVGFGPKNRYLGE",
"VSSMPTLIFYKGGKE", "VSVVDLTVKLNKE", "VTAALRVTD", "VTPLVQNVTGDKE",
"VTRVVGANPAAIKQAIASNV", "VTSSFFYRGNYTDFE", "VVALNDPFITND", "VVKILRE",
"VVLPVDFIIAD", "VVLTHPADE", "VVNIGIGGSDLGPVMVTE", "VVTSASAPPENASE",
"VVVITKNVSGQDVAAALE", "VYHNLKSLTKKRYGASAGNVGDE", "VYKIGGIGTVPVGRVE",
"WAGLGKIDRE", "WFDIKAPSTFE", "WFRIYKIPDGKPE", "WGKFLTCVEVE",
"WLFKLREE", "WMWNQLGNFLQE", "WSKLISE", "WSLTAPLGKALHDLS", "WTKIFKAIHE",
"YAQLLAKRLSE", "YAQLLAKRLSERKAE", "YFATHITE", "YFATHITERE", "YFQLLNSALTE",
"YGYSARVVDLIE", "YGYSTRVVD", "YGYSTRVVDLVE", "YIALVDQLIAKYSS",
"YIASKKGSISAE", "YKDIPVPKPKANE", "YKPLFTE", "YLLKAIKE", "YLNLPEHIVPGTYIQE",
"YNKIGDILSGRLKLRAE", "YQSKIIVFPRDGKAPE", "YQTQVLKNAKALE", "YQYLRSVVNE",
"YRKVLPIVSVPE", "YRLSVLPDNVPIMSVE", "YSLLAWTNIPRKE", "YVAKVSARE",
"YVNKGQDFHIAGE", "YVPSVIEPSFGIGRIIYSVFE", "YVQAAKNSIAAGADGVE"
), class = "factor"), variable = structure(c(1L, 1L, 1L, 1L), .Label = c("Control",
"Treat"), class = "factor"), value = c(3893050.501, 900604.6087,
90008.14298, 656399.2021), pv = c(0.852317422616546, 0.852317422616546,
0.852317422616546, 0.852317422616546)), .Names = c("id", "Sequence",
"variable", "value", "pv"), row.names = c(NA, 4L), class = "data.frame")
Just save the original variable before changing it.
var.save <- tbl_reo$variable
levels(tbl_reo$variable) <- c("Control","Control","Control","Treat","Treat","Treat")
# do whatever you need to do with changed variables
# ...
# ...
tbl_reo$variable <- var.save # change back
This seems relatively straightforward and possibly doable with scale_x_datetime or scale_x_discrete.
I have a column with time increments like on a stopwatch:
[1] 0:00:01 0:00:02 0:00:03 0:00:04 0:00:05 0:00:06
1800 Levels: 0:00:01 0:00:02 0:00:03 0:00:04 0:00:05 0:00:06 0:00:07 ... 0:30:00
Using ggplot how can I set the x-axis labels for 30 second intervals?
Reproducible data:
structure(list(`somedata$Time` = structure(1:4, .Label = c("0:00:01",
"0:00:02", "0:00:03", "0:00:04", "0:00:05", "0:00:06", "0:00:07",
"0:00:08", "0:00:09", "0:00:10", "0:00:11", "0:00:12", "0:00:13",
"0:00:14", "0:00:15", "0:00:16", "0:00:17", "0:00:18", "0:00:19",
"0:00:20", "0:00:21", "0:00:22", "0:00:23", "0:00:24", "0:00:25",
"0:00:26", "0:00:27", "0:00:28", "0:00:29", "0:00:30", "0:00:31",
"0:00:32", "0:00:33", "0:00:34", "0:00:35", "0:00:36", "0:00:37",
"0:00:38", "0:00:39", "0:00:40", "0:00:41", "0:00:42", "0:00:43",
"0:00:44", "0:00:45", "0:00:46", "0:00:47", "0:00:48", "0:00:49",
"0:00:50", "0:00:51", "0:00:52", "0:00:53", "0:00:54", "0:00:55",
"0:00:56", "0:00:57", "0:00:58", "0:00:59", "0:01:00", "0:01:01",
"0:01:02", "0:01:03", "0:01:04", "0:01:05", "0:01:06", "0:01:07",
"0:01:08", "0:01:09", "0:01:10", "0:01:11", "0:01:12", "0:01:13",
"0:01:14", "0:01:15", "0:01:16", "0:01:17", "0:01:18", "0:01:19",
"0:01:20", "0:01:21", "0:01:22", "0:01:23", "0:01:24", "0:01:25",
"0:01:26", "0:01:27", "0:01:28", "0:01:29", "0:01:30", "0:01:31",
"0:01:32", "0:01:33", "0:01:34", "0:01:35", "0:01:36", "0:01:37",
"0:01:38", "0:01:39", "0:01:40", "0:01:41", "0:01:42", "0:01:43",
"0:01:44", "0:01:45", "0:01:46", "0:01:47", "0:01:48", "0:01:49",
"0:01:50", "0:01:51", "0:01:52", "0:01:53", "0:01:54", "0:01:55",
"0:01:56", "0:01:57", "0:01:58", "0:01:59", "0:02:00", "0:02:01",
"0:02:02", "0:02:03", "0:02:04", "0:02:05", "0:02:06", "0:02:07",
"0:02:08", "0:02:09", "0:02:10", "0:02:11", "0:02:12", "0:02:13",
"0:02:14", "0:02:15", "0:02:16", "0:02:17", "0:02:18", "0:02:19",
"0:02:20", "0:02:21", "0:02:22", "0:02:23", "0:02:24", "0:02:25",
"0:02:26", "0:02:27", "0:02:28", "0:02:29", "0:02:30", "0:02:31",
"0:02:32", "0:02:33", "0:02:34", "0:02:35", "0:02:36", "0:02:37",
"0:02:38", "0:02:39", "0:02:40", "0:02:41", "0:02:42", "0:02:43",
"0:02:44", "0:02:45", "0:02:46", "0:02:47", "0:02:48", "0:02:49",
"0:02:50", "0:02:51", "0:02:52", "0:02:53", "0:02:54", "0:02:55",
"0:02:56", "0:02:57", "0:02:58", "0:02:59", "0:03:00", "0:03:01",
"0:03:02", "0:03:03", "0:03:04", "0:03:05", "0:03:06", "0:03:07",
"0:03:08", "0:03:09", "0:03:10", "0:03:11", "0:03:12", "0:03:13",
"0:03:14", "0:03:15", "0:03:16", "0:03:17", "0:03:18", "0:03:19",
"0:03:20", "0:03:21", "0:03:22", "0:03:23", "0:03:24", "0:03:25",
"0:03:26", "0:03:27", "0:03:28", "0:03:29", "0:03:30", "0:03:31",
"0:03:32", "0:03:33", "0:03:34", "0:03:35", "0:03:36", "0:03:37",
"0:03:38", "0:03:39", "0:03:40", "0:03:41", "0:03:42", "0:03:43",
"0:03:44", "0:03:45", "0:03:46", "0:03:47", "0:03:48", "0:03:49",
"0:03:50", "0:03:51", "0:03:52", "0:03:53", "0:03:54", "0:03:55",
"0:03:56", "0:03:57", "0:03:58", "0:03:59", "0:04:00", "0:04:01",
"0:04:02", "0:04:03", "0:04:04", "0:04:05", "0:04:06", "0:04:07",
"0:04:08", "0:04:09", "0:04:10", "0:04:11", "0:04:12", "0:04:13",
"0:04:14", "0:04:15", "0:04:16", "0:04:17", "0:04:18", "0:04:19",
"0:04:20", "0:04:21", "0:04:22", "0:04:23", "0:04:24", "0:04:25",
"0:04:26", "0:04:27", "0:04:28", "0:04:29", "0:04:30", "0:04:31",
"0:04:32", "0:04:33", "0:04:34", "0:04:35", "0:04:36", "0:04:37",
"0:04:38", "0:04:39", "0:04:40", "0:04:41", "0:04:42", "0:04:43",
"0:04:44", "0:04:45", "0:04:46", "0:04:47", "0:04:48", "0:04:49",
"0:04:50", "0:04:51", "0:04:52", "0:04:53", "0:04:54", "0:04:55",
"0:04:56", "0:04:57", "0:04:58", "0:04:59", "0:05:00", "0:05:01",
"0:05:02", "0:05:03", "0:05:04", "0:05:05", "0:05:06", "0:05:07",
"0:05:08", "0:05:09", "0:05:10", "0:05:11", "0:05:12", "0:05:13",
"0:05:14", "0:05:15", "0:05:16", "0:05:17", "0:05:18", "0:05:19",
"0:05:20", "0:05:21", "0:05:22", "0:05:23", "0:05:24", "0:05:25",
"0:05:26", "0:05:27", "0:05:28", "0:05:29", "0:05:30", "0:05:31",
"0:05:32", "0:05:33", "0:05:34", "0:05:35", "0:05:36", "0:05:37",
"0:05:38", "0:05:39", "0:05:40", "0:05:41", "0:05:42", "0:05:43",
"0:05:44", "0:05:45", "0:05:46", "0:05:47", "0:05:48", "0:05:49",
"0:05:50", "0:05:51", "0:05:52", "0:05:53", "0:05:54", "0:05:55",
"0:05:56", "0:05:57", "0:05:58", "0:05:59", "0:06:00", "0:06:01",
"0:06:02", "0:06:03", "0:06:04", "0:06:05", "0:06:06", "0:06:07",
"0:06:08", "0:06:09", "0:06:10", "0:06:11", "0:06:12", "0:06:13",
"0:06:14", "0:06:15", "0:06:16", "0:06:17", "0:06:18", "0:06:19",
"0:06:20", "0:06:21", "0:06:22", "0:06:23", "0:06:24", "0:06:25",
"0:06:26", "0:06:27", "0:06:28", "0:06:29", "0:06:30", "0:06:31",
"0:06:32", "0:06:33", "0:06:34", "0:06:35", "0:06:36", "0:06:37",
"0:06:38", "0:06:39", "0:06:40", "0:06:41", "0:06:42", "0:06:43",
"0:06:44", "0:06:45", "0:06:46", "0:06:47", "0:06:48", "0:06:49",
"0:06:50", "0:06:51", "0:06:52", "0:06:53", "0:06:54", "0:06:55",
"0:06:56", "0:06:57", "0:06:58", "0:06:59", "0:07:00", "0:07:01",
"0:07:02", "0:07:03", "0:07:04", "0:07:05", "0:07:06", "0:07:07",
"0:07:08", "0:07:09", "0:07:10", "0:07:11", "0:07:12", "0:07:13",
"0:07:14", "0:07:15", "0:07:16", "0:07:17", "0:07:18", "0:07:19",
"0:07:20", "0:07:21", "0:07:22", "0:07:23", "0:07:24", "0:07:25",
"0:07:26", "0:07:27", "0:07:28", "0:07:29", "0:07:30", "0:07:31",
"0:07:32", "0:07:33", "0:07:34", "0:07:35", "0:07:36", "0:07:37",
"0:07:38", "0:07:39", "0:07:40", "0:07:41", "0:07:42", "0:07:43",
"0:07:44", "0:07:45", "0:07:46", "0:07:47", "0:07:48", "0:07:49",
"0:07:50", "0:07:51", "0:07:52", "0:07:53", "0:07:54", "0:07:55",
"0:07:56", "0:07:57", "0:07:58", "0:07:59", "0:08:00", "0:08:01",
"0:08:02", "0:08:03", "0:08:04", "0:08:05", "0:08:06", "0:08:07",
"0:08:08", "0:08:09", "0:08:10", "0:08:11", "0:08:12", "0:08:13",
"0:08:14", "0:08:15", "0:08:16", "0:08:17", "0:08:18", "0:08:19",
"0:08:20", "0:08:21", "0:08:22", "0:08:23", "0:08:24", "0:08:25",
"0:08:26", "0:08:27", "0:08:28", "0:08:29", "0:08:30", "0:08:31",
"0:08:32", "0:08:33", "0:08:34", "0:08:35", "0:08:36", "0:08:37",
"0:08:38", "0:08:39", "0:08:40", "0:08:41", "0:08:42", "0:08:43",
"0:08:44", "0:08:45", "0:08:46", "0:08:47", "0:08:48", "0:08:49",
"0:08:50", "0:08:51", "0:08:52", "0:08:53", "0:08:54", "0:08:55",
"0:08:56", "0:08:57", "0:08:58", "0:08:59", "0:09:00", "0:09:01",
"0:09:02", "0:09:03", "0:09:04", "0:09:05", "0:09:06", "0:09:07",
"0:09:08", "0:09:09", "0:09:10", "0:09:11", "0:09:12", "0:09:13",
"0:09:14", "0:09:15", "0:09:16", "0:09:17", "0:09:18", "0:09:19",
"0:09:20", "0:09:21", "0:09:22", "0:09:23", "0:09:24", "0:09:25",
"0:09:26", "0:09:27", "0:09:28", "0:09:29", "0:09:30", "0:09:31",
"0:09:32", "0:09:33", "0:09:34", "0:09:35", "0:09:36", "0:09:37",
"0:09:38", "0:09:39", "0:09:40", "0:09:41", "0:09:42", "0:09:43",
"0:09:44", "0:09:45", "0:09:46", "0:09:47", "0:09:48", "0:09:49",
"0:09:50", "0:09:51", "0:09:52", "0:09:53", "0:09:54", "0:09:55",
"0:09:56", "0:09:57", "0:09:58", "0:09:59", "0:10:00", "0:10:01",
"0:10:02", "0:10:03", "0:10:04", "0:10:05", "0:10:06", "0:10:07",
"0:10:08", "0:10:09", "0:10:10", "0:10:11", "0:10:12", "0:10:13",
"0:10:14", "0:10:15", "0:10:16", "0:10:17", "0:10:18", "0:10:19",
"0:10:20", "0:10:21", "0:10:22", "0:10:23", "0:10:24", "0:10:25",
"0:10:26", "0:10:27", "0:10:28", "0:10:29", "0:10:30", "0:10:31",
"0:10:32", "0:10:33", "0:10:34", "0:10:35", "0:10:36", "0:10:37",
"0:10:38", "0:10:39", "0:10:40", "0:10:41", "0:10:42", "0:10:43",
"0:10:44", "0:10:45", "0:10:46", "0:10:47", "0:10:48", "0:10:49",
"0:10:50", "0:10:51", "0:10:52", "0:10:53", "0:10:54", "0:10:55",
"0:10:56", "0:10:57", "0:10:58", "0:10:59", "0:11:00", "0:11:01",
"0:11:02", "0:11:03", "0:11:04", "0:11:05", "0:11:06", "0:11:07",
"0:11:08", "0:11:09", "0:11:10", "0:11:11", "0:11:12", "0:11:13",
"0:11:14", "0:11:15", "0:11:16", "0:11:17", "0:11:18", "0:11:19",
"0:11:20", "0:11:21", "0:11:22", "0:11:23", "0:11:24", "0:11:25",
"0:11:26", "0:11:27", "0:11:28", "0:11:29", "0:11:30", "0:11:31",
"0:11:32", "0:11:33", "0:11:34", "0:11:35", "0:11:36", "0:11:37",
"0:11:38", "0:11:39", "0:11:40", "0:11:41", "0:11:42", "0:11:43",
"0:11:44", "0:11:45", "0:11:46", "0:11:47", "0:11:48", "0:11:49",
"0:11:50", "0:11:51", "0:11:52", "0:11:53", "0:11:54", "0:11:55",
"0:11:56", "0:11:57", "0:11:58", "0:11:59", "0:12:00", "0:12:01",
"0:12:02", "0:12:03", "0:12:04", "0:12:05", "0:12:06", "0:12:07",
"0:12:08", "0:12:09", "0:12:10", "0:12:11", "0:12:12", "0:12:13",
"0:12:14", "0:12:15", "0:12:16", "0:12:17", "0:12:18", "0:12:19",
"0:12:20", "0:12:21", "0:12:22", "0:12:23", "0:12:24", "0:12:25",
"0:12:26", "0:12:27", "0:12:28", "0:12:29", "0:12:30", "0:12:31",
"0:12:32", "0:12:33", "0:12:34", "0:12:35", "0:12:36", "0:12:37",
"0:12:38", "0:12:39", "0:12:40", "0:12:41", "0:12:42", "0:12:43",
"0:12:44", "0:12:45", "0:12:46", "0:12:47", "0:12:48", "0:12:49",
"0:12:50", "0:12:51", "0:12:52", "0:12:53", "0:12:54", "0:12:55",
"0:12:56", "0:12:57", "0:12:58", "0:12:59", "0:13:00", "0:13:01",
"0:13:02", "0:13:03", "0:13:04", "0:13:05", "0:13:06", "0:13:07",
"0:13:08", "0:13:09", "0:13:10", "0:13:11", "0:13:12", "0:13:13",
"0:13:14", "0:13:15", "0:13:16", "0:13:17", "0:13:18", "0:13:19",
"0:13:20", "0:13:21", "0:13:22", "0:13:23", "0:13:24", "0:13:25",
"0:13:26", "0:13:27", "0:13:28", "0:13:29", "0:13:30", "0:13:31",
"0:13:32", "0:13:33", "0:13:34", "0:13:35", "0:13:36", "0:13:37",
"0:13:38", "0:13:39", "0:13:40", "0:13:41", "0:13:42", "0:13:43",
"0:13:44", "0:13:45", "0:13:46", "0:13:47", "0:13:48", "0:13:49",
"0:13:50", "0:13:51", "0:13:52", "0:13:53", "0:13:54", "0:13:55",
"0:13:56", "0:13:57", "0:13:58", "0:13:59", "0:14:00", "0:14:01",
"0:14:02", "0:14:03", "0:14:04", "0:14:05", "0:14:06", "0:14:07",
"0:14:08", "0:14:09", "0:14:10", "0:14:11", "0:14:12", "0:14:13",
"0:14:14", "0:14:15", "0:14:16", "0:14:17", "0:14:18", "0:14:19",
"0:14:20", "0:14:21", "0:14:22", "0:14:23", "0:14:24", "0:14:25",
"0:14:26", "0:14:27", "0:14:28", "0:14:29", "0:14:30", "0:14:31",
"0:14:32", "0:14:33", "0:14:34", "0:14:35", "0:14:36", "0:14:37",
"0:14:38", "0:14:39", "0:14:40", "0:14:41", "0:14:42", "0:14:43",
"0:14:44", "0:14:45", "0:14:46", "0:14:47", "0:14:48", "0:14:49",
"0:14:50", "0:14:51", "0:14:52", "0:14:53", "0:14:54", "0:14:55",
"0:14:56", "0:14:57", "0:14:58", "0:14:59", "0:15:00", "0:15:01",
"0:15:02", "0:15:03", "0:15:04", "0:15:05", "0:15:06", "0:15:07",
"0:15:08", "0:15:09", "0:15:10", "0:15:11", "0:15:12", "0:15:13",
"0:15:14", "0:15:15", "0:15:16", "0:15:17", "0:15:18", "0:15:19",
"0:15:20", "0:15:21", "0:15:22", "0:15:23", "0:15:24", "0:15:25",
"0:15:26", "0:15:27", "0:15:28", "0:15:29", "0:15:30", "0:15:31",
"0:15:32", "0:15:33", "0:15:34", "0:15:35", "0:15:36", "0:15:37",
"0:15:38", "0:15:39", "0:15:40", "0:15:41", "0:15:42", "0:15:43",
"0:15:44", "0:15:45", "0:15:46", "0:15:47", "0:15:48", "0:15:49",
"0:15:50", "0:15:51", "0:15:52", "0:15:53", "0:15:54", "0:15:55",
"0:15:56", "0:15:57", "0:15:58", "0:15:59", "0:16:00", "0:16:01",
"0:16:02", "0:16:03", "0:16:04", "0:16:05", "0:16:06", "0:16:07",
"0:16:08", "0:16:09", "0:16:10", "0:16:11", "0:16:12", "0:16:13",
"0:16:14", "0:16:15", "0:16:16", "0:16:17", "0:16:18", "0:16:19",
"0:16:20", "0:16:21", "0:16:22", "0:16:23", "0:16:24", "0:16:25",
"0:16:26", "0:16:27", "0:16:28", "0:16:29", "0:16:30", "0:16:31",
"0:16:32", "0:16:33", "0:16:34", "0:16:35", "0:16:36", "0:16:37",
"0:16:38", "0:16:39", "0:16:40", "0:16:41", "0:16:42", "0:16:43",
"0:16:44", "0:16:45", "0:16:46", "0:16:47", "0:16:48", "0:16:49",
"0:16:50", "0:16:51", "0:16:52", "0:16:53", "0:16:54", "0:16:55",
"0:16:56", "0:16:57", "0:16:58", "0:16:59", "0:17:00", "0:17:01",
"0:17:02", "0:17:03", "0:17:04", "0:17:05", "0:17:06", "0:17:07",
"0:17:08", "0:17:09", "0:17:10", "0:17:11", "0:17:12", "0:17:13",
"0:17:14", "0:17:15", "0:17:16", "0:17:17", "0:17:18", "0:17:19",
"0:17:20", "0:17:21", "0:17:22", "0:17:23", "0:17:24", "0:17:25",
"0:17:26", "0:17:27", "0:17:28", "0:17:29", "0:17:30", "0:17:31",
"0:17:32", "0:17:33", "0:17:34", "0:17:35", "0:17:36", "0:17:37",
"0:17:38", "0:17:39", "0:17:40", "0:17:41", "0:17:42", "0:17:43",
"0:17:44", "0:17:45", "0:17:46", "0:17:47", "0:17:48", "0:17:49",
"0:17:50", "0:17:51", "0:17:52", "0:17:53", "0:17:54", "0:17:55",
"0:17:56", "0:17:57", "0:17:58", "0:17:59", "0:18:00", "0:18:01",
"0:18:02", "0:18:03", "0:18:04", "0:18:05", "0:18:06", "0:18:07",
"0:18:08", "0:18:09", "0:18:10", "0:18:11", "0:18:12", "0:18:13",
"0:18:14", "0:18:15", "0:18:16", "0:18:17", "0:18:18", "0:18:19",
"0:18:20", "0:18:21", "0:18:22", "0:18:23", "0:18:24", "0:18:25",
"0:18:26", "0:18:27", "0:18:28", "0:18:29", "0:18:30", "0:18:31",
"0:18:32", "0:18:33", "0:18:34", "0:18:35", "0:18:36", "0:18:37",
"0:18:38", "0:18:39", "0:18:40", "0:18:41", "0:18:42", "0:18:43",
"0:18:44", "0:18:45", "0:18:46", "0:18:47", "0:18:48", "0:18:49",
"0:18:50", "0:18:51", "0:18:52", "0:18:53", "0:18:54", "0:18:55",
"0:18:56", "0:18:57", "0:18:58", "0:18:59", "0:19:00", "0:19:01",
"0:19:02", "0:19:03", "0:19:04", "0:19:05", "0:19:06", "0:19:07",
"0:19:08", "0:19:09", "0:19:10", "0:19:11", "0:19:12", "0:19:13",
"0:19:14", "0:19:15", "0:19:16", "0:19:17", "0:19:18", "0:19:19",
"0:19:20", "0:19:21", "0:19:22", "0:19:23", "0:19:24", "0:19:25",
"0:19:26", "0:19:27", "0:19:28", "0:19:29", "0:19:30", "0:19:31",
"0:19:32", "0:19:33", "0:19:34", "0:19:35", "0:19:36", "0:19:37",
"0:19:38", "0:19:39", "0:19:40", "0:19:41", "0:19:42", "0:19:43",
"0:19:44", "0:19:45", "0:19:46", "0:19:47", "0:19:48", "0:19:49",
"0:19:50", "0:19:51", "0:19:52", "0:19:53", "0:19:54", "0:19:55",
"0:19:56", "0:19:57", "0:19:58", "0:19:59", "0:20:00", "0:20:01",
"0:20:02", "0:20:03", "0:20:04", "0:20:05", "0:20:06", "0:20:07",
"0:20:08", "0:20:09", "0:20:10", "0:20:11", "0:20:12", "0:20:13",
"0:20:14", "0:20:15", "0:20:16", "0:20:17", "0:20:18", "0:20:19",
"0:20:20", "0:20:21", "0:20:22", "0:20:23", "0:20:24", "0:20:25",
"0:20:26", "0:20:27", "0:20:28", "0:20:29", "0:20:30", "0:20:31",
"0:20:32", "0:20:33", "0:20:34", "0:20:35", "0:20:36", "0:20:37",
"0:20:38", "0:20:39", "0:20:40", "0:20:41", "0:20:42", "0:20:43",
"0:20:44", "0:20:45", "0:20:46", "0:20:47", "0:20:48", "0:20:49",
"0:20:50", "0:20:51", "0:20:52", "0:20:53", "0:20:54", "0:20:55",
"0:20:56", "0:20:57", "0:20:58", "0:20:59", "0:21:00", "0:21:01",
"0:21:02", "0:21:03", "0:21:04", "0:21:05", "0:21:06", "0:21:07",
"0:21:08", "0:21:09", "0:21:10", "0:21:11", "0:21:12", "0:21:13",
"0:21:14", "0:21:15", "0:21:16", "0:21:17", "0:21:18", "0:21:19",
"0:21:20", "0:21:21", "0:21:22", "0:21:23", "0:21:24", "0:21:25",
"0:21:26", "0:21:27", "0:21:28", "0:21:29", "0:21:30", "0:21:31",
"0:21:32", "0:21:33", "0:21:34", "0:21:35", "0:21:36", "0:21:37",
"0:21:38", "0:21:39", "0:21:40", "0:21:41", "0:21:42", "0:21:43",
"0:21:44", "0:21:45", "0:21:46", "0:21:47", "0:21:48", "0:21:49",
"0:21:50", "0:21:51", "0:21:52", "0:21:53", "0:21:54", "0:21:55",
"0:21:56", "0:21:57", "0:21:58", "0:21:59", "0:22:00", "0:22:01",
"0:22:02", "0:22:03", "0:22:04", "0:22:05", "0:22:06", "0:22:07",
"0:22:08", "0:22:09", "0:22:10", "0:22:11", "0:22:12", "0:22:13",
"0:22:14", "0:22:15", "0:22:16", "0:22:17", "0:22:18", "0:22:19",
"0:22:20", "0:22:21", "0:22:22", "0:22:23", "0:22:24", "0:22:25",
"0:22:26", "0:22:27", "0:22:28", "0:22:29", "0:22:30", "0:22:31",
"0:22:32", "0:22:33", "0:22:34", "0:22:35", "0:22:36", "0:22:37",
"0:22:38", "0:22:39", "0:22:40", "0:22:41", "0:22:42", "0:22:43",
"0:22:44", "0:22:45", "0:22:46", "0:22:47", "0:22:48", "0:22:49",
"0:22:50", "0:22:51", "0:22:52", "0:22:53", "0:22:54", "0:22:55",
"0:22:56", "0:22:57", "0:22:58", "0:22:59", "0:23:00", "0:23:01",
"0:23:02", "0:23:03", "0:23:04", "0:23:05", "0:23:06", "0:23:07",
"0:23:08", "0:23:09", "0:23:10", "0:23:11", "0:23:12", "0:23:13",
"0:23:14", "0:23:15", "0:23:16", "0:23:17", "0:23:18", "0:23:19",
"0:23:20", "0:23:21", "0:23:22", "0:23:23", "0:23:24", "0:23:25",
"0:23:26", "0:23:27", "0:23:28", "0:23:29", "0:23:30", "0:23:31",
"0:23:32", "0:23:33", "0:23:34", "0:23:35", "0:23:36", "0:23:37",
"0:23:38", "0:23:39", "0:23:40", "0:23:41", "0:23:42", "0:23:43",
"0:23:44", "0:23:45", "0:23:46", "0:23:47", "0:23:48", "0:23:49",
"0:23:50", "0:23:51", "0:23:52", "0:23:53", "0:23:54", "0:23:55",
"0:23:56", "0:23:57", "0:23:58", "0:23:59", "0:24:00", "0:24:01",
"0:24:02", "0:24:03", "0:24:04", "0:24:05", "0:24:06", "0:24:07",
"0:24:08", "0:24:09", "0:24:10", "0:24:11", "0:24:12", "0:24:13",
"0:24:14", "0:24:15", "0:24:16", "0:24:17", "0:24:18", "0:24:19",
"0:24:20", "0:24:21", "0:24:22", "0:24:23", "0:24:24", "0:24:25",
"0:24:26", "0:24:27", "0:24:28", "0:24:29", "0:24:30", "0:24:31",
"0:24:32", "0:24:33", "0:24:34", "0:24:35", "0:24:36", "0:24:37",
"0:24:38", "0:24:39", "0:24:40", "0:24:41", "0:24:42", "0:24:43",
"0:24:44", "0:24:45", "0:24:46", "0:24:47", "0:24:48", "0:24:49",
"0:24:50", "0:24:51", "0:24:52", "0:24:53", "0:24:54", "0:24:55",
"0:24:56", "0:24:57", "0:24:58", "0:24:59", "0:25:00", "0:25:01",
"0:25:02", "0:25:03", "0:25:04", "0:25:05", "0:25:06", "0:25:07",
"0:25:08", "0:25:09", "0:25:10", "0:25:11", "0:25:12", "0:25:13",
"0:25:14", "0:25:15", "0:25:16", "0:25:17", "0:25:18", "0:25:19",
"0:25:20", "0:25:21", "0:25:22", "0:25:23", "0:25:24", "0:25:25",
"0:25:26", "0:25:27", "0:25:28", "0:25:29", "0:25:30", "0:25:31",
"0:25:32", "0:25:33", "0:25:34", "0:25:35", "0:25:36", "0:25:37",
"0:25:38", "0:25:39", "0:25:40", "0:25:41", "0:25:42", "0:25:43",
"0:25:44", "0:25:45", "0:25:46", "0:25:47", "0:25:48", "0:25:49",
"0:25:50", "0:25:51", "0:25:52", "0:25:53", "0:25:54", "0:25:55",
"0:25:56", "0:25:57", "0:25:58", "0:25:59", "0:26:00", "0:26:01",
"0:26:02", "0:26:03", "0:26:04", "0:26:05", "0:26:06", "0:26:07",
"0:26:08", "0:26:09", "0:26:10", "0:26:11", "0:26:12", "0:26:13",
"0:26:14", "0:26:15", "0:26:16", "0:26:17", "0:26:18", "0:26:19",
"0:26:20", "0:26:21", "0:26:22", "0:26:23", "0:26:24", "0:26:25",
"0:26:26", "0:26:27", "0:26:28", "0:26:29", "0:26:30", "0:26:31",
"0:26:32", "0:26:33", "0:26:34", "0:26:35", "0:26:36", "0:26:37",
"0:26:38", "0:26:39", "0:26:40", "0:26:41", "0:26:42", "0:26:43",
"0:26:44", "0:26:45", "0:26:46", "0:26:47", "0:26:48", "0:26:49",
"0:26:50", "0:26:51", "0:26:52", "0:26:53", "0:26:54", "0:26:55",
"0:26:56", "0:26:57", "0:26:58", "0:26:59", "0:27:00", "0:27:01",
"0:27:02", "0:27:03", "0:27:04", "0:27:05", "0:27:06", "0:27:07",
"0:27:08", "0:27:09", "0:27:10", "0:27:11", "0:27:12", "0:27:13",
"0:27:14", "0:27:15", "0:27:16", "0:27:17", "0:27:18", "0:27:19",
"0:27:20", "0:27:21", "0:27:22", "0:27:23", "0:27:24", "0:27:25",
"0:27:26", "0:27:27", "0:27:28", "0:27:29", "0:27:30", "0:27:31",
"0:27:32", "0:27:33", "0:27:34", "0:27:35", "0:27:36", "0:27:37",
"0:27:38", "0:27:39", "0:27:40", "0:27:41", "0:27:42", "0:27:43",
"0:27:44", "0:27:45", "0:27:46", "0:27:47", "0:27:48", "0:27:49",
"0:27:50", "0:27:51", "0:27:52", "0:27:53", "0:27:54", "0:27:55",
"0:27:56", "0:27:57", "0:27:58", "0:27:59", "0:28:00", "0:28:01",
"0:28:02", "0:28:03", "0:28:04", "0:28:05", "0:28:06", "0:28:07",
"0:28:08", "0:28:09", "0:28:10", "0:28:11", "0:28:12", "0:28:13",
"0:28:14", "0:28:15", "0:28:16", "0:28:17", "0:28:18", "0:28:19",
"0:28:20", "0:28:21", "0:28:22", "0:28:23", "0:28:24", "0:28:25",
"0:28:26", "0:28:27", "0:28:28", "0:28:29", "0:28:30", "0:28:31",
"0:28:32", "0:28:33", "0:28:34", "0:28:35", "0:28:36", "0:28:37",
"0:28:38", "0:28:39", "0:28:40", "0:28:41", "0:28:42", "0:28:43",
"0:28:44", "0:28:45", "0:28:46", "0:28:47", "0:28:48", "0:28:49",
"0:28:50", "0:28:51", "0:28:52", "0:28:53", "0:28:54", "0:28:55",
"0:28:56", "0:28:57", "0:28:58", "0:28:59", "0:29:00", "0:29:01",
"0:29:02", "0:29:03", "0:29:04", "0:29:05", "0:29:06", "0:29:07",
"0:29:08", "0:29:09", "0:29:10", "0:29:11", "0:29:12", "0:29:13",
"0:29:14", "0:29:15", "0:29:16", "0:29:17", "0:29:18", "0:29:19",
"0:29:20", "0:29:21", "0:29:22", "0:29:23", "0:29:24", "0:29:25",
"0:29:26", "0:29:27", "0:29:28", "0:29:29", "0:29:30", "0:29:31",
"0:29:32", "0:29:33", "0:29:34", "0:29:35", "0:29:36", "0:29:37",
"0:29:38", "0:29:39", "0:29:40", "0:29:41", "0:29:42", "0:29:43",
"0:29:44", "0:29:45", "0:29:46", "0:29:47", "0:29:48", "0:29:49",
"0:29:50", "0:29:51", "0:29:52", "0:29:53", "0:29:54", "0:29:55",
"0:29:56", "0:29:57", "0:29:58", "0:29:59", "0:30:00"), class = "factor"),
student = c("bob", "bob", "bob", "bob"), somemeasure = c(0L,
0L, 1L, 1L)), .Names = c("somedata$Time", "student", "somemeasure"
), row.names = c(NA, 4L), class = "data.frame")
Assuming that your data frame is named df. First, create new column which is POSIXct by pasting together some arbitrary date and original Time column and then converting with as.POSIXct().
Then use function scale_x_datetime() to set breaks and format for labels you want to see.
df$Time2<-as.POSIXct(paste("1960-01-01 ",df$Time))
library(scales)
ggplot(df,aes(Time2,somemeasure))+geom_point()+
scale_x_datetime(breaks=date_breaks("30 sec"),labels = date_format("%M:%S"))
I have a large time series data set, which I've used xts to summarize in 30 second periods. Not sure how to make this set easily reproducible but it looks like this
> str(taonedf)
'data.frame': 480 obs. of 2 variables:
$ time : POSIXct, format: "2013-01-06 13:00:29" "2013-01-06 13:00:59" "2013-01-06 13:01:29" ...
$ count: int 20763 12030 22188 12183 21112 11628 21543 12609 20095 12992 ...
> head(taonedf)
time count
1 2013-01-06 13:00:29 20763
2 2013-01-06 13:00:59 12030
3 2013-01-06 13:01:29 22188
4 2013-01-06 13:01:59 12183
5 2013-01-06 13:02:29 21112
6 2013-01-06 13:02:59 11628
I've plotted a normal line plot of this and it works fine.
ggplot(data=taonedf, aes(x=time, y=count/30)) + #
geom_line(color="#009E73") +
scale_y_continuous(name="requests per second", labels = format_format(scientific=FALSE, big.mark=",")) +
scale_x_datetime(name="",labels = date_format("%b %d\n%H:%M") ) +
labs(title=paste("Requests per Second - All Requests",count,sep="\n")) +
theme(legend.position = "none")
I want to add some vline annotations. I've created a second dataframe called EV, it looks like this:
> str(ev)
'data.frame': 10 obs. of 2 variables:
$ dt : POSIXct, format: "2013-01-06 13:45:00" "2013-01-06 14:18:00" "2013-01-06 14:49:00" ...
$ event: Factor w/ 9 levels "Event 1",..: 7 8 3 2 5 6 1 4 2 9
> head(ev)
dt event
1 2013-01-06 13:45:00 Event 1
Now, when I add the vline option I get odd results. I'm using the same date time format between the two so the scale should align.
ggplot(data=taonedf, aes(x=time, y=count/30)) +
geom_line(color="#009E73") +
geom_vline(data=ev,aes(xtintercept=dt))+
scale_y_continuous(name="requests per second", labels = format_format(scientific=FALSE, big.mark=",")) +
scale_x_datetime(name="",labels = date_format("%b %d\n%H:%M") ) +
labs(title=paste("Requests per Second - All Requests",count,sep="\n")) +
theme(legend.position = "none")
What am I missing? This doesn't appear to be that hard. All of the documentation and examples show simple numeric X axis so I'm assuming there is some issue with dates in the X axis but I can't pinpoint it. Any help would be appreciated.
> dput(taonedf)
structure(list(time = structure(c(1357506029.996, 1357506059.999,
1357506089.997, 1357506119.998, 1357506149.998, 1357506179.996,
1357506209.996, 1357506239.993, 1357506269.999, 1357506299.996,
1357506329.998, 1357506359.998, 1357506389.999, 1357506419.998,
1357506449.986, 1357506479.996, 1357506509.99, 1357506539.988,
1357506569.996, 1357506599.999, 1357506629.991, 1357506659.998,
1357506689.999, 1357506719.995, 1357506749.996, 1357506779.998,
1357506809.998, 1357506839.997, 1357506869.996, 1357506899.996,
1357506929.997, 1357506959.994, 1357506989.998, 1357507019.999,
1357507049.999, 1357507079.998, 1357507109.998, 1357507139.999,
1357507169.998, 1357507199.99, 1357507229.999, 1357507259.999,
1357507289.999, 1357507319.998, 1357507349.997, 1357507379.997,
1357507409.999, 1357507439.998, 1357507469.994, 1357507499.996,
1357507529.996, 1357507559.996, 1357507589.995, 1357507619.988,
1357507649.999, 1357507679.994, 1357507709.996, 1357507739.996,
1357507769.994, 1357507799.991, 1357507829.999, 1357507859.999,
1357507889.999, 1357507919.999, 1357507949.999, 1357507979.999,
1357508009.999, 1357508039.999, 1357508069.998, 1357508099.999,
1357508129.999, 1357508159.999, 1357508189.999, 1357508219.998,
1357508249.999, 1357508279.999, 1357508309.999, 1357508339.999,
1357508369.999, 1357508399.999, 1357508429.998, 1357508459.999,
1357508489.999, 1357508519.999, 1357508549.999, 1357508579.999,
1357508609.999, 1357508639.999, 1357508669.999, 1357508699.999,
1357508729.999, 1357508759.998, 1357508789.999, 1357508819.998,
1357508849.999, 1357508879.998, 1357508909.999, 1357508939.996,
1357508969.999, 1357508999.999, 1357509029.999, 1357509059.999,
1357509089.999, 1357509119.999, 1357509149.999, 1357509179.999,
1357509209.999, 1357509239.999, 1357509269.999, 1357509299.999,
1357509329.999, 1357509359.999, 1357509389.999, 1357509419.999,
1357509449.999, 1357509479.999, 1357509509.999, 1357509539.999,
1357509569.976, 1357509599.999, 1357509629.999, 1357509659.999,
1357509689.999, 1357509719.999, 1357509749.996, 1357509779.999,
1357509809.999, 1357509839.999, 1357509869.999, 1357509899.999,
1357509929.999, 1357509959.996, 1357509989.999, 1357510019.997,
1357510049.998, 1357510079.997, 1357510109.999, 1357510139.999,
1357510169.999, 1357510199.999, 1357510229.999, 1357510259.999,
1357510289.999, 1357510319.999, 1357510349.999, 1357510379.999,
1357510409.999, 1357510439.999, 1357510469.999, 1357510499.999,
1357510529.999, 1357510559.999, 1357510589.999, 1357510619.999,
1357510649.999, 1357510679.999, 1357510709.999, 1357510739.983,
1357510769.999, 1357510799.999, 1357510829.999, 1357510859.999,
1357510889.999, 1357510919.999, 1357510949.999, 1357510979.999,
1357511009.997, 1357511039.999, 1357511069.999, 1357511099.999,
1357511129.999, 1357511159.999, 1357511189.999, 1357511219.999,
1357511249.999, 1357511279.999, 1357511309.999, 1357511339.999,
1357511369.999, 1357511399.999, 1357511429.999, 1357511459.999,
1357511489.999, 1357511519.999, 1357511549.999, 1357511579.999,
1357511609.999, 1357511639.999, 1357511669.999, 1357511699.999,
1357511729.999, 1357511759.999, 1357511789.996, 1357511819.999,
1357511849.999, 1357511879.999, 1357511909.999, 1357511939.993,
1357511969.999, 1357511999.998, 1357512029.999, 1357512059.999,
1357512089.999, 1357512119.999, 1357512149.999, 1357512179.998,
1357512209.999, 1357512239.999, 1357512269.999, 1357512299.999,
1357512329.997, 1357512359.993, 1357512389.997, 1357512419.999,
1357512449.999, 1357512479.998, 1357512509.999, 1357512539.999,
1357512569.999, 1357512599.999, 1357512629.999, 1357512659.995,
1357512689.999, 1357512719.999, 1357512749.999, 1357512779.995,
1357512809.999, 1357512839.999, 1357512869.999, 1357512899.999,
1357512929.999, 1357512959.999, 1357512989.997, 1357513019.996,
1357513049.999, 1357513079.999, 1357513109.999, 1357513139.999,
1357513169.999, 1357513199.993, 1357513229.999, 1357513259.999,
1357513289.999, 1357513319.999, 1357513349.998, 1357513379.999,
1357513409.999, 1357513439.999, 1357513469.999, 1357513499.999,
1357513529.999, 1357513559.999, 1357513589.999, 1357513619.999,
1357513649.999, 1357513679.999, 1357513709.999, 1357513739.999,
1357513769.999, 1357513799.998, 1357513829.997, 1357513859.999,
1357513889.999, 1357513919.999, 1357513949.999, 1357513979.998,
1357514009.999, 1357514039.996, 1357514069.999, 1357514099.999,
1357514129.999, 1357514159.999, 1357514189.999, 1357514219.999,
1357514249.999, 1357514279.999, 1357514309.999, 1357514339.993,
1357514369.999, 1357514399.999, 1357514429.999, 1357514459.999,
1357514489.999, 1357514519.999, 1357514549.988, 1357514579.997,
1357514609.999, 1357514639.998, 1357514669.984, 1357514699.999,
1357514729.999, 1357514759.999, 1357514789.999, 1357514819.999,
1357514849.999, 1357514879.999, 1357514909.999, 1357514939.996,
1357514969.999, 1357514999.999, 1357515029.999, 1357515059.998,
1357515089.999, 1357515119.97, 1357515149.998, 1357515179.999,
1357515209.999, 1357515239.999, 1357515269.999, 1357515299.999,
1357515329.999, 1357515359.999, 1357515389.999, 1357515419.999,
1357515449.999, 1357515479.999, 1357515509.999, 1357515539.999,
1357515569.999, 1357515599.999, 1357515629.995, 1357515659.999,
1357515689.999, 1357515719.999, 1357515749.999, 1357515779.999,
1357515809.995, 1357515839.999, 1357515869.999, 1357515899.999,
1357515929.999, 1357515959.999, 1357515989.999, 1357516019.999,
1357516049.999, 1357516079.999, 1357516109.999, 1357516139.999,
1357516169.999, 1357516199.999, 1357516229.999, 1357516259.998,
1357516289.998, 1357516319.999, 1357516349.999, 1357516379.999,
1357516409.999, 1357516439.999, 1357516469.999, 1357516499.999,
1357516529.999, 1357516559.999, 1357516589.999, 1357516619.999,
1357516649.999, 1357516679.999, 1357516709.999, 1357516739.999,
1357516769.999, 1357516799.999, 1357516829.999, 1357516859.999,
1357516889.999, 1357516919.999, 1357516949.999, 1357516979.999,
1357517009.999, 1357517039.999, 1357517069.999, 1357517099.999,
1357517129.999, 1357517159.998, 1357517189.999, 1357517219.999,
1357517249.999, 1357517279.999, 1357517309.999, 1357517339.999,
1357517369.999, 1357517399.998, 1357517429.999, 1357517459.999,
1357517489.999, 1357517519.999, 1357517549.999, 1357517579.999,
1357517609.999, 1357517639.999, 1357517669.999, 1357517699.999,
1357517729.999, 1357517759.999, 1357517789.999, 1357517819.999,
1357517849.999, 1357517879.999, 1357517909.999, 1357517939.999,
1357517969.999, 1357517999.999, 1357518029.999, 1357518059.976,
1357518089.999, 1357518119.998, 1357518149.998, 1357518179.999,
1357518209.987, 1357518239.999, 1357518269.998, 1357518299.991,
1357518329.998, 1357518359.999, 1357518389.994, 1357518419.994,
1357518449.995, 1357518479.999, 1357518509.999, 1357518539.998,
1357518569.983, 1357518599.999, 1357518629.998, 1357518659.994,
1357518689.999, 1357518719.988, 1357518749.999, 1357518779.999,
1357518809.999, 1357518839.999, 1357518869.999, 1357518899.999,
1357518929.999, 1357518959.999, 1357518989.999, 1357519019.999,
1357519049.999, 1357519079.998, 1357519109.999, 1357519139.999,
1357519169.999, 1357519199.999, 1357519229.999, 1357519259.999,
1357519289.999, 1357519319.999, 1357519349.999, 1357519379.999,
1357519409.999, 1357519439.999, 1357519469.999, 1357519499.999,
1357519529.999, 1357519559.999, 1357519589.999, 1357519619.999,
1357519649.999, 1357519679.999, 1357519709.999, 1357519739.999,
1357519769.999, 1357519799.999, 1357519829.997, 1357519859.999,
1357519889.999, 1357519919.999, 1357519949.999, 1357519979.999,
1357520009.999, 1357520039.999, 1357520069.999, 1357520099.999,
1357520129.999, 1357520159.999, 1357520189.999, 1357520219.999,
1357520249.999, 1357520279.999, 1357520309.999, 1357520339.999,
1357520369.999, 1357520399.999), tzone = "", tclass = c("POSIXct",
"POSIXt"), class = c("POSIXct", "POSIXt")), count = c(20763L,
12030L, 22188L, 12183L, 21112L, 11628L, 21543L, 12609L, 20095L,
12992L, 21552L, 12447L, 21113L, 12236L, 21705L, 12018L, 21140L,
11820L, 21571L, 12803L, 21146L, 12081L, 21171L, 12440L, 21353L,
11708L, 21476L, 12210L, 21364L, 12041L, 21907L, 11934L, 22207L,
12403L, 21629L, 12676L, 21046L, 12196L, 21673L, 12190L, 21830L,
11652L, 20943L, 12350L, 20848L, 11800L, 21085L, 12367L, 21519L,
12325L, 22217L, 12195L, 22405L, 11869L, 21380L, 12145L, 21842L,
12224L, 21793L, 12856L, 34934L, 24073L, 41005L, 33964L, 46240L,
41287L, 52697L, 62618L, 78594L, 68193L, 76617L, 63747L, 90556L,
75830L, 104609L, 51063L, 67046L, 66977L, 82513L, 87228L, 107474L,
141878L, 127290L, 70953L, 98879L, 87814L, 117309L, 113463L, 150979L,
198271L, 170456L, 108325L, 119583L, 111803L, 117067L, 186768L,
226191L, 235546L, 228039L, 165570L, 159472L, 161707L, 137614L,
180049L, 254616L, 302166L, 336723L, 234902L, 202560L, 210679L,
173053L, 162839L, 262536L, 306859L, 249385L, 300646L, 219594L,
209819L, 166758L, 173716L, 268453L, 310940L, 264778L, 289798L,
202234L, 236882L, 217502L, 181157L, 196976L, 201901L, 228233L,
221241L, 220140L, 122623L, 76699L, 105589L, 381687L, 264571L,
187083L, 175972L, 202483L, 198547L, 196964L, 206402L, 181260L,
189319L, 162374L, 160412L, 186897L, 184529L, 160056L, 177326L,
184240L, 160864L, 156540L, 150392L, 157610L, 138447L, 148423L,
147318L, 148463L, 114389L, 163761L, 126624L, 167519L, 138240L,
133005L, 120187L, 155814L, 132751L, 140000L, 120323L, 124415L,
129450L, 116635L, 125364L, 108176L, 118877L, 143640L, 132457L,
118641L, 114330L, 135960L, 148066L, 130787L, 130230L, 130436L,
107109L, 129405L, 116093L, 135293L, 119048L, 147364L, 127028L,
145576L, 139960L, 139896L, 139433L, 127806L, 124845L, 141319L,
132821L, 129279L, 111905L, 130898L, 133135L, 138201L, 121460L,
143846L, 92964L, 100614L, 85637L, 139594L, 124302L, 106071L,
128247L, 120788L, 176300L, 144378L, 126209L, 117886L, 111001L,
105855L, 122387L, 152357L, 103217L, 134069L, 106021L, 91796L,
103335L, 99422L, 115839L, 147787L, 128868L, 123416L, 109312L,
129782L, 109397L, 130418L, 113709L, 103774L, 133272L, 137311L,
138079L, 132308L, 119744L, 164226L, 149361L, 135044L, 110185L,
151246L, 141811L, 160525L, 128407L, 159161L, 142969L, 150370L,
128705L, 151884L, 171663L, 150428L, 154910L, 165016L, 163729L,
169727L, 144913L, 163476L, 159984L, 155767L, 142334L, 177964L,
169230L, 135086L, 139350L, 174013L, 164427L, 154289L, 143392L,
187156L, 139426L, 159207L, 187435L, 198519L, 132559L, 163582L,
179069L, 150413L, 161463L, 173357L, 162457L, 136248L, 144086L,
151073L, 130237L, 144066L, 179840L, 135843L, 147757L, 206373L,
140734L, 177374L, 176168L, 154999L, 136136L, 187568L, 142357L,
152180L, 168528L, 131228L, 140622L, 145363L, 93070L, 58613L,
82024L, 86640L, 77493L, 71205L, 87641L, 89232L, 99214L, 89311L,
87948L, 90790L, 91326L, 106916L, 97318L, 89452L, 91658L, 82069L,
92559L, 89194L, 81721L, 83490L, 96388L, 90145L, 79861L, 90301L,
77676L, 262966L, 227355L, 256477L, 238905L, 241260L, 206168L,
229477L, 215515L, 245217L, 232026L, 225308L, 223537L, 198524L,
237840L, 233483L, 193081L, 216570L, 212949L, 203150L, 240861L,
209596L, 200673L, 180099L, 187726L, 187642L, 188402L, 176871L,
216090L, 203310L, 184723L, 195702L, 204137L, 276952L, 313717L,
323208L, 308448L, 321638L, 378236L, 352163L, 413678L, 395997L,
354317L, 366915L, 339465L, 346781L, 394895L, 355176L, 349618L,
417590L, 335474L, 405686L, 362581L, 356525L, 354142L, 383487L,
334305L, 327489L, 336201L, 374153L, 341485L, 321473L, 308773L,
15709L, 8870L, 15563L, 8944L, 15941L, 9342L, 16303L, 8951L, 14969L,
9385L, 14537L, 9963L, 15676L, 9011L, 16552L, 9587L, 16802L, 9693L,
15267L, 8946L, 14189L, 9067L, 14359L, 9776L, 167922L, 337364L,
350941L, 362928L, 364922L, 319641L, 348687L, 321356L, 400161L,
334171L, 332829L, 323842L, 397809L, 375694L, 384432L, 356825L,
350846L, 395942L, 359471L, 296926L, 418481L, 322144L, 335658L,
347212L, 334421L, 375769L, 364300L, 317370L, 373192L, 346713L,
356341L, 327225L, 305538L, 347815L, 276914L, 322149L, 303627L,
292363L, 284724L, 305082L, 373363L, 304386L, 438592L, 403579L,
430549L, 450536L, 432445L, 389779L, 434888L, 375010L, 456096L,
577393L, 451122L, 432354L, 425547L, 417729L)), .Names = c("time",
"count"), row.names = c(NA, -480L), class = "data.frame")
> dput(ev)
structure(list(dt = structure(c(1357508700, 1357510680, 1357512540,
1357515360, 1357517220, 1357517700, 1357518000, 1357518000, 1357519140,
1357519140), class = c("POSIXct", "POSIXt"), tzone = ""), event = structure(c(7L,
8L, 3L, 2L, 5L, 6L, 1L, 4L, 2L, 9L), .Label = c("Event 1",
"Event 2", "Event 3",
"Event 4", "Event 5",
"Event 6", "Event 7",
"Event 8", "Event 9"
), class = "factor")), .Names = c("dt", "event"), row.names = c(NA,
-10L), class = "data.frame")
Library Versions:
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-redhat-linux-gnu (64-bit)
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] reshape2_1.2.2 xts_0.9-1 zoo_1.7-9 gdata_2.12.0 data.table_1.8.6 caTools_1.14
[7] scales_0.2.3 ggplot2_0.9.3
Simplied code - this still doesnt work
library(scales)
library(ggplot2)
taonedf<-dget("taonedf") #in this thread
ev<-dget("ev") #in this thread
ggplot(data=taonedf, aes(x=time, y=count/30)) +
geom_line() +
geom_vline(data=ev,aes(xtintercept=as.numeric(dt)))
To get geom_vline() display lines as intended, first, library scales should be loaded. Then use as.numeric() in geom_vline().
library(scales)
+ geom_vline(data=ev,aes(xintercept=as.numeric(dt)))
Two things
You need to wrap the datetimes for the vline in as.numeric
You misspelled xintercept
Fixing those:
library("ggplot2")
library("scales")
ggplot(data=taonedf, aes(x=time, y=count/30)) +
geom_line(color="#009E73") +
geom_vline(data=ev,aes(xintercept=as.numeric(dt)))+
scale_y_continuous(name="requests per second", labels = format_format(scientific=FALSE, big.mark=",")) +
scale_x_datetime(name="",labels = date_format("%b %d\n%H:%M") ) +
labs(title=paste("Requests per Second - All Requests")) +
theme(legend.position = "none")