use https://ucla.edu/stat/stata/notes/hsb2, clear generate rannum = uniform() egen grp2 = cut(rannum), group(4) sort id list id grp2 in 1/20 id grp2 1.
It is possible to make the code even simpler then the above by using the egen , cut() command.
Now that that's out of the way, my problem is that I am (attempting) to code a text adventure game, along the lines of D&D.
I'm stuck at an early stage- namely, how to assign a random integer between 1 and 18 to a variable.
This is not an indication of a security issue such as a virus or attack.
It could be something as simple as a run away script or learning how to better use E-utilities, for more efficient work such that your work does not impact the ability of other researchers to also use our site.
The closest I've come is using the lambda function, so that when I call up the variable it generates a random number which is different each time.
None of these have rally worked, and I would really like to know what I'm doing wrong.
To restore access and understand how to better interact with our site to avoid this in the future, please have your system administrator contact [email protected]
Before I say anything else, I would like to mention that I am almost completely new to coding, and only have a very rudimentary understanding of python.