Displaying 2 results from an estimated 2 matches for "simulation_003f".
2012 Mar 27
1
ignore error getting next result
Dear All,
How do I ignore an error and still getting result of next iteration.
I am trying to do wilcox.test on a loop, when the test fail, I would like to continue doing the next iteration and getting the p-value.
I tried to do tryCatch or try but I cannot retrieve the p-value if the test is not fail.
sample code:
test2=list(numeric(0),c(10,20));
test1=list(c(1),c(1,2,3,4));
for (i in 1:2){
2010 Jul 12
3
Continuing on with a loop when there's a failure
Hi R sages,
Here is my latest problem. Consider the following toy example:
x <- read.table(textConnection("y1 y2 y3 x1 x2
indv.1 bagels donuts bagels 4 6
indv.2 donuts donuts donuts 5 1
indv.3 donuts donuts donuts 1 10
indv.4 donuts donuts donuts 10 9
indv.5 bagels donuts bagels 0 2
indv.6 bagels donuts bagels 2 9
indv.7 bagels donuts bagels 8 5
indv.8 bagels donuts bagels 4 1
indv.9