Chapter 49 Symptoms and the Products Causing it
We examine the Products associated with the Symptoms and plot them in a bar plot. We choose the Symptoms such as Diarrhoea, Vomiting and Dizziness to investigate the products.
Peanut Butter and Fish Oil are 2 most commonly occurring culprits
SymptomPlots = function(keywordSymptom,fillColorName = fillColor)
{
AdverseFoodEvents %>%
filter(str_detect(Symptoms,keywordSymptom)) %>%
PlotProducts(fillColorName = fillColorName)
}
49.1 Diarrhoea
keywordSymptom="DIARRHOEA"
SymptomPlots(keywordSymptom,fillColor2)
49.2 Vomiting
keywordSymptom="VOMITING"
SymptomPlots(keywordSymptom)
49.3 Abdominal Pain
keywordSymptom="ABDOMINAL PAIN"
SymptomPlots(keywordSymptom)
49.4 Dizziness
keywordSymptom="DIZZINESS"
SymptomPlots(keywordSymptom)