i have such a data: V1 V2 V3 V4 a b c e a f d NA b d e f h d NA NA a d f e 仭伃仭伃 (V1,V2,V3,V4 can be any one of a, b, c, d, e, f, g, h. that is to say ,it has 8 possible values.) and i want to change it the the following form: a b c d e f g h 8 7 6 2.5 5 2.5 2.5 2.5 #2.5is the mean of (4+3+2+1) 8 3 3 6 3 7 3 3 #3 is the mean of (5+4+3+2+1) 2.5 8 2.5 7 6 5 2.5 2.5 #2.5is the mean of (4+3+2+1) 3.5 3.5 3.5 7 3.5 3.5 3.5 8 #3.5is the mean of (6+54+3+2+1) 8 2.5 2.5 7 5 6 2.5 2.5 仭伃仭伃 i want to know if there is some easy way to achieve my goal using R?