PCA of certain columns R

broken image
broken image
broken image

Str_detect(ingredient, 'bitters') ~ str_replace(measure, 'oz$', 'dash'), Str_detect(ingredient, 'orange') ~ 'orange juice', Str_detect(ingredient, 'grapefruit') ~ 'grapefruit juice',

broken image

Str_detect(ingredient, 'lime') ~ 'lime juice', Str_detect(ingredient, 'lemon') ~ 'lemon juice', Str_detect(ingredient, 'bitters') ~ 'bitters', Ingredient = str_remove(ingredient, ' (if desired)$'), Ingredient = str_remove(ingredient, ' liqueur$'), Ingredient = str_replace_all(ingredient, '-', ' '),

broken image