I have long format data in R for recipes, where each ingredient is listed by row:
house rec ingr
98 leche de soya Leche de soya
98 leche de soya pan
98 arroz arroz
98 arroz aceite
98 arroz agua
98 arroz cebolla
98 pollo pollo
98 pollo sal
98 pollo aceite
98 papas fritas papa
98 papas fritas aceite
98 carne de res carne de res
98 carne de res aceite
124 Platano platano
124 Platano queso
124 cafŽ cafŽ
124 cafŽ azucar
124 CafŽ agua
124 majadito arroz
124 majadito carne
I want the ingredients for each unique recipe name and house id. Ideally I would like a data frame 962 columns wide (number of ingredients) with a 1 or zero if the ingredient was present or not or a transaction table, but I'm stuck.