I have deleted and reinstalled the latest versions of R (3.4) and Rstudio for Mac OS X from https://cran.r-project.org/bin/macosx/ and https://www.rstudio.com/products/rstudio/download/, respectively. I checked that R works properly in the Terminal by attaching a package. I opened Rstudio and cleared the environment using the broom. I then typed
print(3) in the console. The result did not appear. Instead the memory used by Rstudio (as seen in my Activity Monitor) goes up and up, up to sometimes 40 GB (with physical memory being 16 GB). The CPU usage of Rstudio is 100%. My laptop ventilates a lot. Rstudio stops responding and the only thing left to do is to Force Quit. I have reproduced this problem dozens of times today and would love some help. I also noticed this kernel_task using 100 % of a CPU whenever Rstudio is using 100 % of another CPU. Note that I have 4 cores. After force quitting, my activity monitor does not show high CPU and memory usage and my laptop stops ventilating.