Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: List command


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: List command
Date   Wed, 30 Jul 2008 18:27:32 +0100

You need to find out more about string functions. Start with the help. 

In this case, 

list whatever if substr(drugname, 1, 3) == "TAG" 

Nick 
n.j.cox@durham.ac.uk 

Daniel Sepulveda-Adams
Thank you, now if I need all the subject that start with TAG

Gabi Huiber

try =="TAGAMET"

On Wed, Jul 30, 2008 at 1:05 PM, Daniel Sepulveda-Adams
<sepul003@umn.edu> wrote:

> I know this is a basic question but I'm having problems to list a
specific
> element in a variable. The elements in the variables are drugs names,
> therefore are string format.
>
> The command that I'm using is:
>
> List [name of the variable] if [name of the variable]==TAGAMET
>
> Could somebody tell me what I'm doing wrong? or if there is other way
to
do

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index