Updating a plot during a loop seems to be a known bug of RStudio.
There is a workaround : )
The command that is not updated in a loop here was the histogram command:
histogram(rrarray)
What worked was this (link to source):
hg<-histogram(rrarray)
print(hg)
Happy loops : )