Hi,
I have got two dataframes and I want to go from 1 to 2 and from 2 to 1.
So from:
to:
Seems to be quite simple but I have done probably all possible combinations between names_from and values_from but I have not achieved what I wanted.
How should I do it ?
DF1 <- structure(list(Date = structure(c(1451865600, 1451865600, 1451865600,
1451865600, 1452988800, 1455148800, 1455148800, 1455494400, 1455494400,
1455494400, 1455494400, 1455667200, 1455667200, 1455667200, 1457308800,
1457308800, 1457308800, 1457308800, 1457827200, 1457827200, 1458604800,
1458604800, 1458604800, 1458604800, 1458691200, 1458691200, 1458691200,
1458691200, 1463875200, 1463875200, 1463875200, 1468281600, 1468281600,
1468281600, 1468281600, 1473465600, 1476316800, 1476316800, 1476316800,
1476316800, 1482192000, 1482192000, 1482192000, 1482192000), class = c("POSIXct",
"POSIXt"), tzone = "UTC"), Salesman = c("Edyta", "Edyta", "Edyta",
"Edyta", "Ewa", "Lena", "Lena", "Michal", "Michal", "Michal",
"Michal", "Piotr", "Piotr", "Piotr", "Jola", "Jola", "Jola",
"Jola", "Jola", "Jola", "Marek", "Marek", "Marek", "Marek", "Piotr",
"Piotr", "Piotr", "Piotr", "Jan", "Jan", "Jan", "Piotr", "Piotr",
"Piotr", "Piotr", "Edyta", "Edyta", "Edyta", "Edyta", "Edyta",
"Marek", "Marek", "Marek", "Marek"), Part_number = c("CA-1462-SXA-B",
"BS-5717-CR-C", "CA-1462-SXA-B", "BS-5717-CR-C", "BS-5717-CR-C",
"CCN-3277-ANA-C", "CIA-2966-FAC-A", "AYU-7812-PL-A", "AYU-7812-PL-A",
"BS-5717-CR-C", "AA-2618-RA-C", "CG-3503-PG-A", "C-2173-TF-B",
"CE-2213-LAR-A", "C-2173-TF-B", "CG-3503-PG-A", "BS-5717-CR-C",
"CIA-2966-FAC-A", "C-2573-TF-B", "CCN-3277-ANA-C", "BS-5717-CR-C",
"CCC-4299-XB-C", "AA-2618-RA-C", "AYU-7912-PL-A", "AA-2618-RA-C",
"BC-6707-ANE-A", "AYU-7712-PL-A", "CCN-3277-ANA-C", "BC-6707-ANE-A",
"CA-1462-SXA-B", "C-2173-TF-B", "CCC-4259-XB-C", "C-2173-TF-B",
"CCC-4299-XB-C", "C-2173-TF-B", "AYF-1720-XS-C", "CIA-2966-FAC-A",
"AA-2618-RA-C", "CG-3503-PG-A", "CCC-4299-XB-C", "CE-2213-LAR-A",
"BS-5717-CR-C", "C-2173-TF-B", "C-2173-TF-B"), Amount = c(44,
44, 31, 92, 97, 40, 33, 57, 46, 19, 30, 58, 41, 27, 96, 49, 23,
28, 67, 11, 13, 90, 70, 31, 89, 26, 89, 24, 100, 94, 41, 49,
100, 96, 23, 22, 91, 75, 18, 14, 63, 25, 51, 30)), class = c("tbl_df",
"tbl", "data.frame"), row.names = c(NA, -44L))