structure(list(Order = c("100003378", "100003378", "100003378",
"100003378", "100003378", "100003378", "100003378", "100003378",
"100016566", "100016566"), Op = c(1016, 1017, 1018, 1019, 1020,
1400, 1500, 9997, 1800, 1850), `Op Desc` = c("SOLDER REWORK IAW 200358984",
"PP&C REWORK IAW 200358984", "INSPECT IAW 200358984", "QNOTE REVIEW IAW 200358984",
"WI 1000 Program FPGA / Test CCA", "WI 1400 Vacuum Bake",
"WI 1500 Quality Inspection", "PP&C Material Movement / Go To Stock",
"WI1800Test,TempTest,Tune Puck by Sanding", "WI 1850 Bond SAT Wires, As Required"
), `Part No` = c("2355805G1", "2355805G1", "2355805G1", "2355805G1",
"2355805G1", "2355805G1", "2355805G1", "2355805G1", "2353604G1",
"2353604G1"), WBS = c("G-CUST-01", "G-CUST-01", "G-CUST-01",
"G-CUST-01", "G-CUST-01", "G-CUST-01", "G-CUST-01", "G-CUST-01",
"G-CUST-01", "G-CUST-01"), `Work Cntr` = c("CHRP0000", "CHRP0000",
"CHRI0000", "CHRP0000", "26502122", "26303014", "26601012", "26801702",
"26502132", "26203022"), `Actual Start` = structure(c(1576610787.297,
1578489110.297, 1578493446.18, 1578600321, 1578617121.747, 1578943396.57,
1580227782.307, 1580417882.567, 1548185774.11, 1580986391.243
), tzone = "UTC", class = c("POSIXct", "POSIXt")), `Actual Comp` = structure(c(1578443159.437,
1578489164.8, 1578494073.52, 1578600334.077, 1578618039.147,
1579611732.62, 1580413592.273, 1580417887.177, 1580986384.79,
1580986425.4), tzone = "UTC", class = c("POSIXct", "POSIXt")),
Operation_Span = structure(c(21.2080108796308, 0.000630821759502093,
0.00726087962863622, 0.000151354165540801, 0.0106180555566593,
7.73537094907352, 2.15057831018611, 5.33564830267871e-05,
379.636697685186, 0.000395335648898725), class = "difftime", units = "days")), row.names = c(NA,
-10L), groups = structure(list(Order = c("100003378", "100016566"
), .rows = structure(list(1:8, 9:10), ptype = integer(0), class = c("vctrs_list_of",
"vctrs_vctr", "list"))), row.names = 1:2, class = c("tbl_df",
"tbl", "data.frame"), .drop = TRUE), class = c("grouped_df",
"tbl_df", "tbl", "data.frame"))
我正在尝试使用它,但是它不起作用
df_Exciter <- df1 %>%
filter(`Actual Start` > "2020-06-01" & Date <"2020-12-01")%>%
group_by(`Part No`,`Order`) %>%
arrange(Order,`Actual Start`)
有没有一种方法可以创建一个函数,指定我可以看到的最近X个月的数据?我是R语言的新手,正在尝试了解如何使用dplyr
如果Actual Start
两个日期过滤器都打算使用此列,则该列将为您工作。
df1 %>%
filter(`Actual Start` > "2020-06-01") %>%
filter(`Actual Start` < "2020-12-01") %>%
group_by(`Part No`,`Order`) %>%
arrange(Order,`Actual Start`)
但是,您提供的样本数据在过滤的时间段内有零列。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句