Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: Dependencies in Stata ado-packages

From   Joerg Luedicke <>
Subject   Re: st: Dependencies in Stata ado-packages
Date   Mon, 18 Jun 2012 21:16:47 -0500

I am not sure if there is a convention for this. What I do in a
program that I am currently writing is to include a check whether the
desired function can be found in the Mata library and print out an
error message if not, suggesting to install -moremata- from SSC. So I
am using the -moremata- function -mm_which()- and my ado code reads

capt mata mata which mm_which()
if _rc {
    di as error "mm_which() from -moremata- is required; type -ssc
install moremata- to obtain it"
    exit 499

which I think saw in a similar form before in a program written by Ben
Jann (the author of -moremata-).


On Mon, Jun 18, 2012 at 6:39 PM, Brendan Halpin <> wrote:
> Is there any mechanism for dealing with the situation where one
> user-written package depends on another?
> If no mechanism, is there a convention?
> More concretely: I have a package which uses mm_expand() from moremata.
> Is there a way of making -net install mypackage- check for the presence
> of moremata and install it if it is missing? If not, is there a standard
> way to bring it to the user's attention?
> Brendan
> --
> Brendan Halpin,   Department of Sociology,   University of Limerick,   Ireland
> Tel: w +353-61-213147  f +353-61-202569  h +353-61-338562;  Room F1-009 x 3147
>    ULSociology on Facebook:
>         twitter:@ULSociology
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index