Rmd code chunk runs slowly while the console works normal

My workplace computer has recently been updated from Windows 7 to 10. It caused my R Markdown code chunks slow down quite significantly. The interesting part is that the slowdown doesn't affect the console but only affects the code chunks when I hit the green run button. In other words, if I copy and paste the code into the console, it would work just fine. I tried to reinstall RStudio though it didn't help. I also tried to put the entire R folder into the Windows Defender exclusion list per suggestion from a prior thread, but that didn't help, either. Does anyone have an idea? Many thanks in advance.

My environment:
Windows 10
RStudio v1.2.1335
R v3.5.3

1 Like

I have the same issue. My current code chunk has been evaluating for over 2 mins now, while the code takes under 5 seconds to execute in R console/ RStudio .R file

Does it have anything to do with setting cache=T at global level?

My Environment is:
Linux 5.0.7-arch1-1-ARCH #1 SMP PREEMPT Mon Apr 8 10:37:08 UTC 2019 x86_64 GNU/Linux
R v3.5.3
RStudio v1.1.463

1 Like

Hi inanias, thanks for responding to my post. Does your problem also affect the result display? For me, it also makes printing results really slow. For simple things such as summary(), it will take several seconds to display the results. I can see it printing characters literally one by one. If I run the same function in console, it works instantly as it should.

1 Like

This topic was automatically closed 21 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.