I wrote a script which works very correctly on small sample datasets, but when I try the same thing on much larger - and real - datas, R Studio Session crashes with a fatal error, as does R session when I run the script without using RStudio. Here 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 a for loop, foreach package, apply functions, plyr's one... Nothing worked. I am sorry not being able to give a reproducible example, but the scripts and data are very large, and when they are just an extract, it works...
Do anyone know what is the problem ? I precise that I don't get any error message...
EDIT
Here's my code, if it help anyone finding solution :
# pairing des sections
print("Pairing...")
pair <- pairing(revs)
# établissement de la struture en "text" et "diff"
revs <- structure(revs)
# initialisation de la boucle
if(init) revs <- init(revs)
else revs[[1]] <- start
depart_id <- max(revs[[1]][length(revs[[1]]) - 1][[1]]$diff$id)
print("Versionning... ")
for(i in 2:length(revs)) {
print(i)
old <- revs[[i-1]]
new <- revs[[i]]
pairSmall <- filter(pair, pairing == i)
revs[[i]] <- one.status(new, old, pairSmall)
revs[[i]] <- two.status(revs[[i]], old, pairSmall, depart_id)
revs[[i]] <- three.status(revs[[i]],old, pairSmall, calcul.id(revs[[i]], old))
revs[[i]] <- four.status(revs[[i]], old, pairSmall, calcul.id(revs[[i]], old))
revs[[i]] <- five.status(revs[[i]], old, pairSmall)
revs[[i]] <- six.status(revs[[i]], old, pairSmall, calcul.id(revs[[i]], old))
revs[[i]] <- seven.status(revs[[i]], old, pairSmall, calcul.id(revs[[i]], old))
revs[[i]] <- eight.status(revs[[i]], old, pairSmall, calcul.id(revs[[i]], old))
}