I tried it. it works out perfectly. you save my life. -- View this message in context: http://r.789695.n4.nabble.com/Re-how-to-apply-sample-function-to-each-row-of-a-data-frame-tp3050933p3054117.html Sent from the R help mailing list archive at Nabble.com.