Question: I have a dataset, includes invoice number, items, and quantity, purchased by customers, like this: InvoiceNo. Eggs Chocolate Donuts Cream Donuts Creamcheese Air Frier 5110064
I have a dataset, includes invoice number, items, and quantity, purchased by customers, like this:
InvoiceNo. Eggs Chocolate Donuts Cream Donuts Creamcheese Air Frier
5110064 4 6 5 1 0
5110498 2 0 1 0 1
My goal is to use R to find and combine similar items, such as "Chocolate Donuts" and "Cream Donuts" should be merged to "Donuts" and the quantities are 11 and 1, respectively. Is there any way to achieve?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
