我是R的新手。如何在apply
/ sapply
中而不是在for
循环中编写此代码?
for ii in c(1:5) {
resultFisher <- runTest(sampleGOdata, algorithm = "classic", statistic = "fisher")
}
我尝试了
lapply(1:5, function(X) resultFisher <- runTest(sampleGOdata, algorithm = "classic", statistic = "fisher"))
它没有用,只是一遍又一遍地运行它,但实际上并没有遍历它。
谢谢!