I'm using R on R studio. In this case I can't use foreach. I would like to do something fairly simple: given a for loop:
for(i:1:1000000)
{
#some code here
}
One way to speed it up is to create two or more for loops and make them working on different chunks of data in different sessions.
Like:
for(i:1:500000)
{
#some code here
}
and
for(i:500001:1000000)
{
#some code here
}
on two different sessions.
I would like to not to use the "system2" package. There must be a package that does it without having to manually open another session. How to do it?
Cheers,
Dario.