Hi guys,
I have 2 dataframes. I need add a new column in the dataframe x, using the more similar data in the dataframe Y.
x<- data.frame(customer=c("2BOSA7A6T"))
y<- data.frame(supplier=c("2BOS A7A6T;SC4","2BOS A7A6T;SL4",
"2BOS A7M6T;SC4", "2BOS A7M6T;SL4"))
### the result would be that:
x<- data.frame(customer=c("2BOSA7A6T"),
supplier=c("2BOS A7A6T;SC4",
"2BOS A7A6T;SL4"))
### I think sapply function could help