Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Dependencies in Stata ado-packages


From   Joerg Luedicke <joerg.luedicke@gmail.com>
To   statalist@hsphsun2.harvard.edu
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 <brendan.halpin@ul.ie> 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:brendan.halpin@ul.ie    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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index