Hi Oliver,
I found out what was causing the problem, in my case anyway:
RStudio had been updated to the latest version, but R itself was still running on an older version which must not have been compatible with the updated RStudio. Try updating R itself in RGui to see if that fixes the issue. I wasn't able to update R as the version was too old for the "installr" function, so I had to download the latest version off the internet. Then, when starting up RStudio, press and hold Ctrl as you click the RStudio icon and a window will pop up where you can select which version of R you want to run.
Hope this helps