0

The data frame is a transaction database. It include: category, time, merchant, vendor, amount columns. I want to group any transactions that have the keywords "travel", "airbnb", "airlines", "uber", "Lyft" (in any columns, these keywords can exist in either merchant or vendor or both) with the accordant amount.

How can I do it ?

  • 2
    Welcome to SO, Thao Duyen Tran! Questions on SO really benefit from being reproducible, where we have sample data (`dput(.)` or `data.frame(.)` are best), code you've attempted, and the actual-vs-expected output; if there are errors or warnings, include the text verbatim. Please see https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info for good discussions on framing questions in this way, then [edit] your questions with the requested additions. Thanks! – r2evans Oct 21 '21 at 19:57

0 Answers0