method column in returned data frame is the match for the name in method_col based on the supplied methods_lu.

bin_method(df, methods_lu, method_col = "method", unassigned = "observed")

Arguments

df

Dataframe to attribute with the standardised method from the methods_lu.

methods_lu

Dataframe with 'method' column for the original method name and 'method_gp' column for the standardised methods.

method_col

Character. Name of column in df with method.

unassigned

Character. Value for unmatched or NA methods.

Value

Dataframe with standardised method column.