last day (23 days later) » 

7:54 PM
Let's troubleshoot to see where the code is breaking down for you.
dplyr uses the "pipe" %>% symbol to send the output of one function into the first input of the next function, creating a chain of multiple steps. So we can troubleshoot by removing pipes and seeing where the error arises. There's also a neat library called tidylog which creates a running description of what each step in the chain is doing.
In your case, I'd want to check what df2 %>% left_join(df2, by = "id") produces.
In my case, I get a table with three columns: id, source.x, and source.y
 

  last day (23 days later) »