0

I have been trying to use the fuzzy join package to join the "conservation status" column from the con_filtered_report_groups data frame to the report_groups_order dataframe that has the rest of the information i am wanting to use. I want to join them so that they are matched by the species name which is a column in both dataframes.

I have tried this code

fuzzy_left_join(x=report_groups_order, y = con_filtered_report_groups, by = "species_name", match_fun= TRUE)

and this is error that appears

Error in `purrr::as_mapper()`:
! Can't convert `.f`, `TRUE`, to a function.
Backtrace:
 1. fuzzyjoin::fuzzy_left_join(...)
 2. fuzzyjoin::fuzzy_join(x, y, by, match_fun, mode = "left", ...)
 4. purrr:::as_mapper.default(match_fun)
 5. rlang::as_function(.f)

I may not have the correct code to make this happen

Any advice for help would be appreciated

Phil
  • 7,287
  • 3
  • 36
  • 66
rhelp
  • 1
  • 1
  • Welcome to SO! Please read this post on how to create a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – Desmond Jun 01 '22 at 06:17
  • Hi, welcome to SO. It is advisable to include some description (structure, `dput`) of your dataset to make the code actually reproducible. This will enhance the chances of getting useful answers. – hamagust Jun 06 '22 at 13:30
  • `match_fun` should be a function. See also the {powerjoin} package where I've tried to make fuzzy joins more intuitive – moodymudskipper Jun 21 '22 at 11:18

0 Answers0