I should have noted that the first attempt list above obviously was practice when cleary$D1== 4. To reiterate, this still didn't work. -- View this message in context: http://r.789695.n4.nabble.com/For-loop-dummy-variables-tp3001396p3001398.html Sent from the R help mailing list archive at Nabble.com.