Hi

I asked on stack overflow for assistance on how to use R to match data based on some distance criteria between two databases. The original question is here: How to match items in R based on some criteria? - Stack Overflow

Using a toy database, this worked without issue.

However, extending to a much larger database, I obtain the following error:

```
Error: Problem with `mutate()` column `cr`.
i `cr = map(data, addCrit, df2)`.
x Problem with `mutate()` column `crit`.
i `crit = map_dbl(data, crit, df_1)`.
x Result 1 must be a single double, not a double vector of length 4
Run `rlang::last_error()` to see where the error occurred.
```

Does anyone know what this error refers to and how I can solve for it?

Thanks