inst/unitTests/exportBugTest.R

test01 <- function(){
	mB <- c(1,2,1,3,4,10)
	MO <- c("Full", "noYS", "noYZ", "noYSZS", "noS", "noZ", 
			"noY", "justS", "justZ", "noSZ", "noYSZ")

	testouts <- foreach(i = 1:length(mB)) %do% {
					  MO[mB[i]]
					  }
	testouts2 <- foreach(i = 1:length(mB)) %dopar% {
					  MO[mB[i]]
					  }
	checkEquals(testouts, testouts2)
}

Try the foreach package in your browser

Any scripts or data that you put into this service are public.

foreach documentation built on May 2, 2019, 6:09 p.m.