I have 2 data frames. One is repair cost data and the other is a list of part numbers and part names. They look like so. I need to combine the part numbers and part name into one variable in df1 so i can show both on a ggplot graph.
df1: Part_Number: c(A123, A321, A231, A231, A123, A321) Repair_Cost: c(150, 230, 100, 120, 180, 120)
df2: Part_Number: c(A321, A231, A123) Part_Name: c(Wheel, Strut, Mount)
for each observation in df1 i would like to show not only the part number, but the name associated with the part. If this can be done using tidyverse code i would appreciate that.
So far i have attempted different things this was the closest i've gotten
Df1$Part.Name<-ifelse(Df1$Part_Num %in% df2$PartNumber,df2$part_name) Df1$Part_Num_Name<-paste(Df1$Part_Num,": ",Df1$Part.Name)