My apologies, I didn't realize checking HTML format would produce unreadable text. WIll repost after some more thought to the problem. Thank you. -- View this message in context: http://r.789695.n4.nabble.com/Newbie-code-to-count-runs-of-up-or-down-moves-tp4662423p4662431.html Sent from the R help mailing list archive at Nabble.com.