Update R code for new join implementation.
Closes #593