Hi,
I need to analyze witch of the vectors created below appears in the dataframe sample.df.
sample.df<- data.frame(stringsAsFactors= FALSE,
text = c("AUDI A4 2015 AVANT(V.M.)3.0 TDI qtro Str 160kW Bus Sp Diesel Manuale
")
make<- c("audi", "aud")
model<- c("a4", "avant")
ccm1<- c("3.0", "TDI")
kw<- c("160kw","160")
fuel<- c("diesel")
gearbox<- c("Manual", "Manuale")
drivetype<- c("front")
trimlevel<- c("bus", "business")
I would like to get this result
sample.df<- data.frame(stringsAsFactors= FALSE,
text = c("AUDI A4 2015 AVANT(V.M.)3.0 TDI qtro Str 160kW Bus Sp Diesel Manuale
"),make = c("audi"), model= c("a4"), ccm1= c("3.0 tdi"),
kw= c("160kw"), fuel= c("diesel"), gearbox= c("manuale"), drivetype= c(NA),
trimlevel= c("bus"))
Anyway, is there possible to show "business", when the text shows just the string "bus", is there any way to do that?
Thanks in advance.
<sup>Created on 2020-05-26 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)</sup>