Statalist


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

Re: st: Finding all variables NOT containing a string - SOLVED


From   "Alex Gamma" <[email protected]>
To   <[email protected]>
Subject   Re: st: Finding all variables NOT containing a string - SOLVED
Date   Tue, 9 Oct 2007 16:14:13 +0200

Hi Scott,

Yes, it works, and it's what I want. I've simply overlooked this although a similar example is actually given in the help-file, as I now see.

Thanks a lot!

Alex


----- Original Message ----- From: "Scott Merryman" <[email protected]>
To: <[email protected]>
Sent: Tuesday, October 09, 2007 3:53 PM
Subject: Re: st: Finding all variables NOT containing a string



This does not work?

-ds *tempsa*, not -

Scott

On 10/9/07, Alex Gamma <[email protected]> wrote:
Hi Statasticians

I have a simple problem, but wasn't able to find the solution:
I want to

a) find all variables whose names do NOT contain a given string (say,
"tempsa")
b) have them stored in r(varlist)

Neither -describe-, -lookfor-, nor -ds- seem to be able to do the job. I've
looked on the web and found Fred Wolfe's -lfsum-, which finds variables
containing a given string with the possibility to exclude other strings. But
this command is unable to handle wildcards, so that I cannot list ALL
variables except for those containing the string "tempsa". (Also it does not
store its results in r(varlist)).

I hope and assume that some of you will immediately know the solution since
this must be a frequently encountered problem.

Best regards,
Alex


--
Alex Gamma Ph.D.
University Hospital of Psychiatry
Research Department
Lenggstr. 31
8032 Zurich
Switzerland

Tel: +4144 384 2621
Fax: +4144 384 2446
e-mail: [email protected]


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index