Hi All, Thank all for the input. These different solutions rock!. Hao -- View this message in context: http://www.nabble.com/how-to-calculate-another-vector-based-on-the-data-from-a-combination-of-two-factors-tp20532749p20553226.html Sent from the R help mailing list archive at Nabble.com.