Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Assigning prime numbers

From   [email protected]
To   <[email protected]>
Subject   st: Assigning prime numbers
Date   Thu, 12 May 2005 17:27:56 +0100


I have a string variable which can take about 500 different values.  I
would like to assign a different prime number to each value of this
string so that I get:

String   Prime
A01		2
A02		3
A03		5
B01		7
C01		11
D02		13
F03		17

Any suggestions would be most welcome!




*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index