Bookmark and Share

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


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

Re: st: Dependencies in Stata ado-packages


From   Joerg Luedicke <[email protected]>
To   [email protected]
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-).

Joerg


On Mon, Jun 18, 2012 at 6:39 PM, Brendan Halpin <[email protected]> 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
> mailto:[email protected]    ULSociology on Facebook: http://on.fb.me/fjIK9t
> http://teaching.sociology.ul.ie/bhalpin/wordpress         twitter:@ULSociology
> *
> *   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/

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index