When working with very large sets of minc files (> ~800) in RMINC you may run into the following error:

Not enough available file descriptors to open <N> files, maybe try setting ulimit -Sn <some-larger-number>

R can only maintain a certain number of open files at a given time, if RMINC determines that you cannot open enough files to safely run your command it will issue the error above. In order to fix this problem: