R crash after big for loop, apply or foreach : I wrote a script which work very correctly on a small sample datasets, but when I am trying the same on much larger - and real - datas, R Studio Session crash with fatal error, as do R session when I run the script without using RStudio. Here's is my sessionInfo() :

    R version 3.3.1 (2016-06-21)
    Platform: x86_64-w64-mingw32/x64 (64-bit)
    Running under: Windows >= 8 x64 (build 9200)
    
    locale:
    [1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252
    [4] LC_NUMERIC=C                   LC_TIME=French_France.1252    
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     
    
    loaded via a namespace (and not attached):
    [1] rsconnect_0.4.3 tools_3.3.1  

 
I tried building the same script using for loop, foreach package, apply functions, plyr's one... Nothing worked. I am sorry not being able to give a reproductible example, but scripts and data are very large, and when they are just extract, it works...

Do anyone know what is the problem ? I precise that I don't get any error message...