Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: really silly question


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: really silly question
Date   Tue, 8 Mar 2011 08:38:17 +0000

I don't see why you want to write a program to tabulate two variables
when you can just type

. tab x y

But here is one.

program mytab
         version 8.2



On Tue, Mar 8, 2011 at 2:46 AM, Scott Talkington <[email protected]> wrote:
> The stuff that stumps me in stata is usually something so simple that it's
> impossible to find a help file or a faq that deals with it in simple terms.
>
> I want to write a program that obtains a variable name from keyboard input
> and then executes a series of commands on that variable.  This should be
> pretty simple programming but I can't find a simple description of it.
>
> lets say I want to fill a local variable `x' with one variable name and a
> local variable `y' with another variable name than then execute the command
>
> .tab `x' `y'
>
> and then at the end of the loop it just stops and waits for the keyboard
> input again
>
> Isn't there a simple and obvious way to do this?  Or is it so obvious that
> it's never mentioned?  It's driving me nuts.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index