R Session Aborted and R encountered a fatal error | RStudio

Viewed 30507

I was using RStudio for a long time and it was ok with me, but before one day when I try to compile a code, it gives this message "R encountered a fatal error" and it forces me to restart RStudio again and the problem still.

the code I used just call two libraries:

library(Rtsne)
library(ggplot2)

And this I was run it before multiple time and it's ok.

Any help, please?

3 Answers

This issue can occur in many instances and the causes might be multiple. I run a very large dataset relating to the single cell transcriptome, and the error can occur unexpectedly and randomly. Sometimes this will happen but can be fixed after restart the session, sometimes this will not happen running the same code.

I experienced the same "R session aborted" after updating R. I thought it was R's fault, then I tested the script in terminal and everything worked fine. I tried reinstalling Rstudio (same version) and it still failed. The issue was solved by installing the lastest Rstudio from https://dailies.rstudio.com/.

I have encountered this problem when running the first chunk in every RMD file I create, specifically when clicking the 'run current chunk' arrow sign.

One way to avoid this is to run the first chunk after highlighting the code in lines, and simply clicking the 'run selected lines' command on the top right-hand corner. From my experience the subsequent chunks can be run without issue by clicking the 'run chunk' arrow.

Related