d<-data.table(d)
#> Error in data.table(d): could not find function "data.table"
d$Vol4=d$Volume/4
#> Error in eval(expr, envir, enclos): object 'd' not found
d$LV4=d$Long_volume/4
#> Error in eval(expr, envir, enclos): object 'd' not found
d<-d[,-c("Time1","iti","x")]
#> Error in eval(expr, envir, enclos): object 'd' not found
d
#> Error in eval(expr, envir, enclos): object 'd' not found
d$Hour = cut(d$DateTime, breaks="hour")
#> Error in cut(d$DateTime, breaks = "hour"): object 'd' not found
q<-d%>%arrange(desc(Speed))
#> Error in d %>% arrange(desc(Speed)): could not find function "%>%"
q1<-datapasta::df_paste(head(q,20))
#> Could not format input_table as table. Unexpected class.
data.frame(stringsAsFactors=FALSE,
Detector_id = c(54216431L, 54216431L, 54216431L, 54216431L, 54216431L,
54216431L,
54211832L,
135209731L, 54212332L,
135009621L,
54211832L, 54215231L,
54213231L,
54216431L, 54216431L,
54216431L,
135008011L,
135003211L, 54216431L,
3321L),
Detector_name = c("US54 at Washington-EB-L1", "US54 at Washington-EB-L1",
"US54 at Washington-EB-L1",
"US54 at Washington-EB-L1",
"US54 at Washington-EB-L1",
"US54 at Washington-EB-L1",
"US54 at Hoover-EB-L2",
"US-54 at Tyler - EB - L1",
"US54 at I-235-EB-L2",
"I-135 at Hydraulic-South-SB-L1",
"US54 at Hoover-EB-L2",
"US54 at Sycamore-EB-L1",
"US54 at SW Blvd - East-EB-L1",
"US54 at Washington-EB-L1",
"US54 at Washington-EB-L1",
"US54 at Washington-EB-L1",
"I-135 at 13th-NB-L1",
"I-135 at K-15 - NB - L1",
"US54 at Washington-EB-L1",
"Airport North - SB - L1"),
Direction = c("EB", "EB", "EB", "EB", "EB", "EB", "EB", "EB", "EB",
"SB", "EB",
"EB", "EB", "EB",
"EB", "EB", "NB",
"NB", "EB",
"SB"),
Date = c("1/2/2016", "1/2/2016", "1/2/2016", "1/2/2016",
"1/2/2016",
"1/2/2016",
"1/3/2016", "1/3/2016",
"1/3/2016",
"1/3/2016",
"1/3/2016", "1/3/2016",
"1/3/2016",
"1/3/2016",
"1/3/2016", "1/3/2016",
"1/4/2016",
"1/4/2016",
"1/5/2016",
"1/6/2016"),
Time = c("3:45", "4:15", "4:30", "4:45", "6:45", "7:00", "2:30",
"2:30", "2:45",
"3:00", "3:00",
"3:00", "3:15",
"10:45",
"11:00", "16:45",
"2:45", "3:15",
"10:15", "1:30"),
Volume = c(4L, 4L, 4L, 4L, 12L, 12L, 16L, 4L, 4L, 4L, 4L, 4L, 4L,
12L, 12L, 16L,
4L, 4L, 20L,
8L),
Speed = c(95L, 95L, 95L, 95L, 95L, 95L, 95L, 95L, 95L, 95L, 95L,
95L, 95L, 95L,
95L, 95L, 95L,
95L, 95L, 95L),
Long_volume = c(4L, 4L, 4L, 4L, 4L, 12L, 4L, 0L, 0L, 4L, 4L, 0L, 0L, 8L,
8L, 8L, 0L, 0L,
4L, 8L),
Device_id = c(505421643L, 505421643L, 505421643L, 505421643L,
505421643L,
505421643L,
505421183L, 505420973L,
505421233L,
513500963L,
505421183L, 505421523L,
505421323L,
505421643L,
505421643L, 505421643L,
513500803L,
513500323L,
505421643L,
545300033L),
Vol4 = c(1, 1, 1, 1, 3, 3, 4, 1, 1, 1, 1, 1, 1, 3, 3, 4, 1, 1, 5, 2),
LV4 = c(1, 1, 1, 1, 1, 3, 1, 0, 0, 1, 1, 0, 0, 2, 2, 2, 0, 0, 1, 2)
)
#> Detector_id Detector_name Direction Date Time
#> 1 54216431 US54 at Washington-EB-L1 EB 1/2/2016 3:45
#> 2 54216431 US54 at Washington-EB-L1 EB 1/2/2016 4:15
#> 3 54216431 US54 at Washington-EB-L1 EB 1/2/2016 4:30
#> 4 54216431 US54 at Washington-EB-L1 EB 1/2/2016 4:45
#> 5 54216431 US54 at Washington-EB-L1 EB 1/2/2016 6:45
#> 6 54216431 US54 at Washington-EB-L1 EB 1/2/2016 7:00
#> 7 54211832 US54 at Hoover-EB-L2 EB 1/3/2016 2:30
#> 8 135209731 US-54 at Tyler - EB - L1 EB 1/3/2016 2:30
#> 9 54212332 US54 at I-235-EB-L2 EB 1/3/2016 2:45
#> 10 135009621 I-135 at Hydraulic-South-SB-L1 SB 1/3/2016 3:00
#> 11 54211832 US54 at Hoover-EB-L2 EB 1/3/2016 3:00
#> 12 54215231 US54 at Sycamore-EB-L1 EB 1/3/2016 3:00
#> 13 54213231 US54 at SW Blvd - East-EB-L1 EB 1/3/2016 3:15
#> 14 54216431 US54 at Washington-EB-L1 EB 1/3/2016 10:45
#> 15 54216431 US54 at Washington-EB-L1 EB 1/3/2016 11:00
#> 16 54216431 US54 at Washington-EB-L1 EB 1/3/2016 16:45
#> 17 135008011 I-135 at 13th-NB-L1 NB 1/4/2016 2:45
#> 18 135003211 I-135 at K-15 - NB - L1 NB 1/4/2016 3:15
#> 19 54216431 US54 at Washington-EB-L1 EB 1/5/2016 10:15
#> 20 3321 Airport North - SB - L1 SB 1/6/2016 1:30
#> Volume Speed Long_volume Device_id Vol4 LV4
#> 1 4 95 4 505421643 1 1
#> 2 4 95 4 505421643 1 1
#> 3 4 95 4 505421643 1 1
#> 4 4 95 4 505421643 1 1
#> 5 12 95 4 505421643 3 1
#> 6 12 95 12 505421643 3 3
#> 7 16 95 4 505421183 4 1
#> 8 4 95 0 505420973 1 0
#> 9 4 95 0 505421233 1 0
#> 10 4 95 4 513500963 1 1
#> 11 4 95 4 505421183 1 1
#> 12 4 95 0 505421523 1 0
#> 13 4 95 0 505421323 1 0
#> 14 12 95 8 505421643 3 2
#> 15 12 95 8 505421643 3 2
#> 16 16 95 8 505421643 4 2
#> 17 4 95 0 513500803 1 0
#> 18 4 95 0 513500323 1 0
#> 19 20 95 4 505421643 5 1
#> 20 8 95 8 545300033 2 2
Created on 2019-10-22 by the reprex package (v0.3.0)