Not that I'm aware of, but there could have been without me realising, it's a work computer.
But even so, I'm not sure why it would be different in RStudio than in the R GUI. In fact, a detail I forgot to mention is that it did work fine in RStudio when I was rendering the reprex. Don't know what that means.