Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: filtered display or scalars?


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: filtered display or scalars?
Date   Tue, 3 Apr 2012 09:33:28 +0100

As far as I know, you can't wildcard anything but variable names.

My only suggestion is that you keep track of what scalars you create
and then use Stata to produce a list of those names. If you knew that
you had scalars foo1-foo42 you could go

forval i = 1/42 {
    local names `names' foo`i'
}
scalar li `names'

Nick

On Tue, Apr 3, 2012 at 9:03 AM,  <Stefan.Gawrich@hlpug.hessen.de> wrote:
> Hi Statalisters,
>
> In the last months I frequently used Stata to create XML-Files for Instantatlas geomapping software.
>
> I use scalars to store indicator data and XML-lines. Several (ten-)thousand scalars are needed to create a map.
> While programming or debugging I often want to look at certain groups of scalars but "scalar dir" offers the whole list only.
>
> Is there any way to obtain a filtered list (something like - scalar dir city_xy_* -) which only displays scalars with a given string?
*
*   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   |   Site index