Hi Dylan, I'm able to reproduce your error. I think this same bug has been previously reported at [1]. As discussed there, the reason is that substrings ending in ">" get stripped out by org-babel-comint-with-output because it thinks they are prompts (in particular, they match comint-prompt-regexp). I'm attaching a patch to solve the issue. It replaces org-babel-comint-with-output, with an R call to capture.output. I think this approach is simpler and more robust, since it doesn't need to do any parsing to remove prompts or other unwanted outputs. I haven't committed to ob-R.el before, so thought it would be best to solicit feedback here before merging this in. Cheers, Jack [1] https://orgmode.org/list/875zgjh8wn.fsf@gmail.com/