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: SMCL {stata args[:txt]}


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: SMCL {stata args[:txt]}
Date   Wed, 1 Jun 2011 16:45:52 -0400

K D Nash <[email protected]>:

clear all
prog lime
 li m* in `0'
 end
prog lime2
 li m* if make=="`0'"
 end
sysuse auto
forvalues n=1/5 {
loc vn=make[`n']
dis _col(10)"{stata lime `n':`vn'}"
}
forvalues n=1/5 {
loc vn=make[`n']
dis _col(10)"{stata lime2 `vn':`vn'}"
}


On Wed, Jun 1, 2011 at 4:26 PM, K D Nash <[email protected]> wrote:
> I have a stata program that lists identification (ID) numbers for
> individuals as output such as:
>
> .list guys
>
>    30382960
>   112339480
>   134302176
>   138380064
>   138405264
>   140426064
>   142468640
>   148400608
>   163325504
>   181440336
>   186361696
>
> The user of this program wants to be able to click on an ID number which
> will then provide further information about the individual selected.  The
> following is part of my program statements:
>
> .......
> forvalues n=1/`k'{
> loc vn=guys[`n']
> dis _col(10)"{stata smcprog:`vn'}"
> }
> .......
>
> where `k' is a count of the number ID numbers listed and guys[`n'] is the ID
> of a guy in the dataset.  This SMCL statement solves the problem of turning
> the list of ID numbers into "clickable links".
>
> The problem I am having is the following.  How do I get the program,
> smcprog.ado, to recognize 30382960 as the ID number that is clicked?  When
> the user clicks an ID, I want the program smcprog.ado to go get a stata
> dataset that includes many ID numbers but then use only the data for the ID
> that was clicked to carry out other tasks.
>
> Or, is there a better way to accomplish what I want to do.  The listing of
> the ID output has to be clickable links

*
*   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