Message-ID: <1306956478767-3566681.post@n4.nabble.com>
Date: 2011-06-01T19:27:58Z
From: Lisa
Subject: Recode numbers
In-Reply-To: <4DE68A0A.90509@gmail.com>
Thank you, Duncan,
Here ?a? has the length of 24, and ?b? has the length of 20 with numbers
from 1 to 20 uniquely. I just want encode ?a? from 1 to 20 based on ?a?
current order using ?b?. So, a1[1] = b[1] = 1
a1[2] = b[2] = 5
a1[3] = a1[4] = b[3] = 8 (since third and fourth numbers are the same in
?a?)
a1[5] = a1[6] = b[4] = 9
a1[7] = b[5] = 14
a1[8] = b[6] = 20
a1[9] = b[7] = 3
a1[10] = a1[11] = b[8] = 10
...
a1[23] = b[19] = 15
a1[24] = b[20] = 19
--
View this message in context: http://r.789695.n4.nabble.com/Recode-numbers-tp3566395p3566681.html
Sent from the R help mailing list archive at Nabble.com.