Skip to contents

This function reads in two dataframes, both comprised of an ID row and a name row. The name rows are matched based on fuzzy search suggestions and human confirmation using the GUI interface.

Usage

Fuzzy_Matcher(df1, df2, focus_term, multimatch = FALSE)

Arguments

df1

Required - The primary dataframe, with items that need matches. The dataframe must be two columns in size; the first column must be the ID column, the second must be the item names.

df2

Required - The secondary dataframe, with a list of potential items to match the contents of df1 against. The dataframe must be two columns in size; the first column must be the ID column, the second must be the item names.

focus_term

Optional - Specify a string. If the string is contained in the item name, then the fuzzy matcher opens a wider potential list of matches to that item.

multimatch

Optional - default: FALSE - TRUE or FALSE. If set to TRUE, allows multimatches to occur.

Value

An R object or csv that contains items from df1 and their counterparts from df2 in the same row.

Details

Because of the GUI nature of the Fuzzy Matcher, an R-based description or example is not able to help guide using this function as it might with a more standard R function. Because of this a quick guide has been created which I encourage you to examine, which can be found at https://tomcodd.github.io/NutritionTools/articles/Fuzzy-Matcher-Guide.html