I am attempting to analyze correlation between coffee and how it tastes.
Basically how coffee's varietal, process, origin, etc. influence coffee's taste. I have a sizable set of data but 'cupping notes' usually contain more than 1 flavor notes.
I have divided flavor notes into few columns. Here is an example data-
coffee_d <- data.frame(origin = c("Africa", "Africa", "Asia", "Asia"), process = c("Washed", "Natural", "Washed", "Anaerobic"),
flavor1 = c("Nut", "Chocolate", "Ripe Fruit", "Strawberry"), flavor2 = c("Chocolate", "Spice", "Chocolate", "Citrus") )
Now, I would like to count multiple each instance of "Chocolate" note from "Africa" in both flavor1 and flavor2 column.
I would also like to use pairs.panels() to evaluate correlation between coffee origins, process, and flavors.
I simply can't figure out how to collapse the column flavor1 and flavor2 into a single flavors column, containing multiple variables.
I hope I am making some sense.
Thanks in advance.