Thanks Rui...I need chisqtest inside loop , I've given only example code here. -- View this message in context: http://r.789695.n4.nabble.com/Replace-a-variable-by-its-value-tp4630734p4630737.html Sent from the R help mailing list archive at Nabble.com.