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

AW: st: Check whether ado file is installed

From   "Martin Weiss" <>
To   <>
Subject   AW: st: Check whether ado file is installed
Date   Mon, 14 Dec 2009 14:41:11 +0100


Would -estout- be an example, with its four subcommands? So -which esttab- would signal the presence of this particular command, but -estadd- might not be there necessarily?


-----Ursprüngliche Nachricht-----
Von: [] Im Auftrag von Nick Cox
Gesendet: Montag, 14. Dezember 2009 14:41
Betreff: RE: st: Check whether ado file is installed

-which- looks for commands rather than packages. On occasion that would fail whenever a package name does not correspond to a command name. 


Sven-Oliver Spieß

I feel like the 'which' command could be your friend.

You could add something like this to your
	---Beginning example---
	foreach package in pkg1 pkg2 pkg3 {
		capture which `package'
		if _rc==111 ssc install `package'
	---End example---

See 'help which' and 'help profile' for more details.

Jan Sauermann wrote:
> I work on different computers and would Stata to automatically check
> whether a number of ado-files is installed on a local machine. My idea
> was to write something like
> [a command which checks whether one ado-file is installed / or not]
> if package!=installed {
>     ssc install package
> }
> My problem is basically to find a command which (1) checks whether an
> ado file is installed and (2)  gives me a local as return.

*   For searches and help try:

*   For searches and help try:

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