Skip to content
Prev 365810 / 398502 Next

R for skip to the next row if condition met and then another condition to check

Hello,

Please post in plain text not in HTML, like the posting guide asks you to.
To give a data example use ?dput, like this:

dput(head(trboot3, 20))  # paste the output of this in your mail

If you have a sample of trboot4 please also use dput to post it.

Finally, I don't understand your second condition, what does "same 
number one below another in a row" mean? Is it "below" (different rows) 
or in the same row? And you say to keep the first and change the rest. 
Once again, is it the rest of the row?

Anyway I believe I have already found a problem in your code. In

for (i in 2:valboot-1)

you should try to see what exactly is 2:valboot-1. [Tip: it starts with a 1]
Maybe you meant 2:(valboot-1).

Rui Barradas

Em 04-12-2016 10:08, Ashwini Patil escreveu: