RStudio "pausing" when running on laptop after each few lines of code

I'm having an issue with RStudio, where when I try to run lines of code from a script or type into the console, after a couple of lines of code, the code stops running for 5+ minutes (i.e. there is no "stop" sign, the > marker has not reappeared, if I press enter in the console it adds in new lines but no > marker on each line). After 5+ minutes, generally the code has run and I can run a few more lines, then it stops again. This happens whether it is functions I have written, or straightforward functions like rnorm(100). This problem started ~1 month ago

This happens whether I have very little in the environment or various objects and datasets in there. It is happening for a range of different scripts that I have tried, and happens whether I am working in a project, or do not have a project loaded. There is not a saved workspace that is being loaded each time, and I've tried running gc(). I've turned off most of the show

I have completely uninstalled RStudio and R twice so far, including getting rid of Rtools and JAGS and reinstalling them (latest uninstall and reinstall was today). I'm wanting to use RStudio over R as I find package development easier in Rstudio.

I'm on a Windows 10 laptop, which is about 3 years old, but has no trouble with opening or running any other program. I'm using R 4.4.1, and RStudio 2024.04.2+764. I'd appreciate any advice to try to get RStudio back to running as fast as it had been doing? Thanks in advance

I think the first step in diagnosing the problem would be to use the Windows Task Manager to see if either an abnormal amount of CPU cycles or an abnormal amount of memory is being used when you do something simple like rnorm(100).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.