Thanks for your reply.
Yes, I've read that help entry, but it didn't really give me any clues. It's a 64-bit os with a 32-bit build or R and, as I said, I have 6 GB total, so a particular process would be allowed > 4 and R would be able to utilize up to 4.
I assume the length of the vector in the error message is in bytes rather than elements since that is the AFNI brik file size (stored as shorts?), so that shouldn't be at the R vector length limit.
I don't use R much and have not used your code before, so I thought there might be something obvious I'm missing. I'll spend some time with this and post the solution when I find it.