Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Much ado about -ado- and packages installed


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: Much ado about -ado- and packages installed
Date   Tue, 21 Jan 2003 17:35:16 -0000

Yesterday Fred Wolfe started a thread by pointing
out that when a package has been installed repeatedly,
either directly through -ado- or -net- or indirectly
through -ssc-, then -ado- will list each instance of
installation, which can be an irritation.

The thread went hither and thither, but Bill
Gould demonstrated clearly and in detail that
(1) uninstalling packages was good practice,
but
(2) it is not essential.

I was relieved by (2), because I have hitherto,
it seems, got by without uninstalling anything
ever. For that and for other reasons the output
I get from -ado- can be quite extensive.

My contribution now is, I hope, complementary
to Bill's on what you should do. I am
developing ways of seeing the (interesting)
information handled by -ado-. With valuable help from
Fred and from Lee Sieswerda off-line,
a utility -mypkg- for seeing what you have
installed seems near release. It assumes
only Stata 7. The sharp-eyed will guess
that these results come from Stata 8, but
that's incidental.

-mypkg- by itself yields an alphabetic
list of packages installed with your Stata

. mypkg

  +------------------------------------------+
  | number             package          date |
  |------------------------------------------|
  |  [254]             _grmedf    6 Jul 2001 |
  |  [142]             _gslope   14 Jun 2000 |

< snip >

  |  [387]             parmest   18 Nov 2002 |

< snip >
  |  [267]              xx0002    4 Oct 2001 |
  |  [243]                zval    2 May 2001 |
  +------------------------------------------+

By default, each package name occurs just once
according to the last date of installation.
Thus connoisseurs will note that -parmest-
appears just once.

In a second flavour, wildcards capture
sets of package names, each listed with the
last date only

.  mypkg ts* xt*

  +------------------------------------+
  | number       package          date |
  |------------------------------------|
  |  [144]      tscollap   19 Jun 2000 |
  |  [269]       tsgraph    6 Oct 2001 |
  |   [16]         tslib    4 Feb 1999 |
  |   [17]   tslib_part2    4 Feb 1999 |
  |  [270]        tsplot    6 Oct 2001 |
  +------------------------------------+

  +----------------------------------+
  | number     package          date |
  |----------------------------------|
  |  [242]      xtgee2    2 May 2001 |
  |  [373]     xtgraph    1 Nov 2002 |
  |  [338]   xtpattern   12 Aug 2002 |
  |  [328]    xttrans2   11 Jul 2002 |
  +----------------------------------+

and with one (or more) package name(s)
you get the result of -ado desc- for
the last installation of that package(s)

. mypkg parmest

----------------------------------------------------------------------
---------------------------------------
[387] package parmest from http://fmwww.bc.edu/repec/bocode/p
----------------------------------------------------------------------
---------------------------------------

< snip >

INSTALLED ON
      18 Nov 2002
----------------------------------------------------------------------
---------------------------------------

You can use the wildcard syntax to get a terser version
of that:

. mypkg parm*

  +--------------------------------+
  | number   package          date |
  |--------------------------------|
  |  [387]   parmest   18 Nov 2002 |
  +--------------------------------+

With all these syntaxes, an -all- option overrides
the last date of installation default.

. mypkg parm* , all

  +--------------------------------+
  | number   package          date |
  |--------------------------------|
  |  [368]   parmest   27 Oct 2002 |
  |  [387]   parmest   18 Nov 2002 |
  +--------------------------------+

After a little more testing, I will
ask Kit Baum to put -mypkg- on SSC.

Nick
[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/



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