Question: Some context on my environment:

I am running R Studio in a docker container called [rocker/verse](https://hub.docker.com/r/rocker/verse).
I downloaded [this dataset](https://www.kaggle.com/ntnu-testimon/paysim1/download) from Kaggle, which has about 470 MB.

When working with it, at some point RStudio restart. It does't happen after a specific call, and I've seen the same problem when working with other projects. Though it is not related to my code, I am posting it bellow.

```
library(data.table)
fraud<- fread("path.csv")
fraud1<- sort(sample(nrow(fraud), nrow(fraud)*.7))
train<- fraud[fraud1, ]
test<-fraud[-fraud1, ]

```

Usually on the console this message is printed:

> 
> Error: Error occurred during transmission
> 
> 
> 

And, this pop up is also showed:

[![R Session Error](https://i.stack.imgur.com/szlSb.png)](https://i.stack.imgur.com/szlSb.png)

I have no idea what is causing it. I would appreciate any help.

Answer: 
Delete the `.Rhistory` files associated with the installation and any open project.
You have a problem with your user data files for Rstudio. Follow the hints given here: <https://community.rstudio.com/t/rstudio-server-error-occurred-during-transmission/84258> and here: <https://support.rstudio.com/hc/en-us/articles/218730228-Resetting-a-user-s-state-on-RStudio-Server>.