initial version
added missing package requirement
updated with foreach and parallel options
added indexOut to control
added bogus nane to pass R CMD check
updated with recent changes
added legacy function