r.lucchetti(a)univpm.it @ INTERNET skrev 2007-05-22 16:10:30 :
[snip]
ceiling() whould be easy to do. However, with a bit of dexterity you
can
coerce the "int" function to do what you want; for example:
nulldata 100
x = int(uniform()*6)/2
f = int(x)
c = (x-f) ? f+1 : f
It surely would be easier to use genr y = ceiling(x)
As for "mode()", I'm all for it, provided we find a
sensible way to
handle
multi-modal variables.
Also, when we are discussing new functions, a "rank()" function for the
"genr" command, that gives the ranks of the values in a vector, with ties
resulting in ranks being averaged, would be useful.
Regards,
Andreas