Есть ли способ найти все частичные совпадения от df_2 до df_1?
частичное совпадение (если часть строки DF_1 находится во всей строке DF_2) Например, часть «для решения "находится во всей строке" решение "
df_1=data.frame(
DF_1=c("suspension","tablet","for solution","capsule")
)
df_2=data.frame(
index=c("1","2","3","4","5"),
DF_2=c("for suspension", "suspension", "solution", "tablet,ER","tablet,IR")
)
df_out=data.frame(
DF_1=c("suspension","suspension","tablet","tablet","for solution"),
DF_2=c("for suspension", "suspension","tablet,ER","tablet,IR","solution"),
index=c("1","2","4","5","3")
)