[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: rounding down (and up)
On 6/22/2003 13:45, Nick Cox wrote
>Here is a little nitty-gritty problem,
>and I do know Stata solutions.
>My favourite is none of these but
> 5 * floor(mpg/5)
This is what I would think of right away... perhaps because...
>of APL, who introduced it some time before 1962.
... APL used to be my programming language of choice.
>but I incline to thinking that there is
>little pain and much gain in learning
>how to do it with -floor()- and -ceil()-.
When I've taught Stata in the classroom, I've always avoided -recode-
because it seemed to kludgy, and taught the use of -int- (rather than
-floor-, since the data were always positive - something I shouldn't have
* For searches and help try: