Your vectors, set1 and set2 are not numeric (they are character vectors). I see that the same code is used in the tutorial to which you linked, but I'm not sure what package that function, list_to_matrix(), is coming from. So, I can't check to see if something in the source code has changed.
Could you please turn this into a self-contained reprex (short for reproducible example)?
There's a nice FAQ on how to do a minimal reprex for beginners, below:
For pointers specific to the community site, check out the reprex FAQ.