Bhaskar, not your main question, but ...
given that you have column names, you might think of : df2[inc,"date"] <- df1[i,"date"]/7 or : df2[inc,]$date <- df1[i,]$date/7 i.e., using your column names instead of numeric indices. then, also, instead of a for loop, possibly you can use R's nicely vectorized operations. i.e., something like : df2$date <- df2$date/7 nb: i haven't tried to run the above code, so no guarantees. (again, if i've typed that correctly -- i haven't tested -- you will end up with the same answers you *don't* want, but maybe more idiomatically.) cheers, Greg ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.