Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • New package -whichpkg- on SSC

    With thanks as usual to Kit Baum, a new package called whichpkg is available on SSC. whichpkg is essentially an extension to Stata's official which command. It requires Stata 9 or higher.

    whichpkg displays information on all the components of an installed Stata package, including any duplicate files. For each component file of the package, whichpkg displays the full path and filename plus (if the file is text format) all lines starting with "*!". For example,

    Code:
    . whichpkg xtabond2
    All instances on search path of components of package xtabond2.pkg:
    
    C:\ado\plus\x\xtabond2.ado
    *! xtabond2 3.6.1 5 December 2014
    *! David Roodman
    *! Copyright David Roodman 2004-14. May be distributed free.
    
    C:\ado\plus\x\xtabond2.mata
    
    C:\ado\plus\x\xtabond2.hlp
    
    C:\ado\plus\x\xtab2_p.ado
    *! version 3.6.1 5 December 2014
    *! David Roodman, [email protected]
    
    C:\ado\plus\l\lxtabond2.mlib
    Basically ... I wrote this because I kept getting bitten by Mata mlib files that were floating around on my machine and that I didn't realize I had. I'd update a package but the new features didn't appear to work. The reason would be a second mlib that I'd forgotten about and that was being found on the search path before the new/correct one. I would try to be careful about multiple versions of programs by using Stata's which command with the all option to look for the main (ado) program in the package, but that would of course not report on any associated mlibs. Hence ... whichpkg.

  • #2
    I just tried it. Very nice. This is the kind of functionality that would be nice to add to the official -which- command, perhaps as an option. You always tell people to make sure they have the latest version of a program but even if they have the correct main program there could be other parts of the package of programs that are problematic.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    Stata Version: 17.0 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      Yes, I was thinking along the same lines; the first version I wrote was actually called which2 (sound familiar?) and just added .pkg as an allowed extension. Maybe StataCorp will do this. But would change the nature of the program, from being one that is purely one-file-oriented to something more general. And for my purposes, the name whichpkg is a better description anyway.

      If we're going to discuss updates/fixes/etc. to which, my biggest grumble of all [sic] is that all is an option and isn't the default behaviour. My second biggest grumble is more of a wish than a real grumble: I would like which to become an r-class program that leaves in r(version) the version number that appears after "*!" in many ados.

      Comment

      Working...
      X