rqrs is a simplistic program that basically acts as a wrapper around ssc install and net install. I use rqrs to document the community-contributed commands that I use in a do-file and to facilitate the installation of those community-contributed commands on other machines. An example looks like this
Code:
version 15 rqrs findname …
If for no good reason, I wanted to download findname from SJ, if it was not found along the ado-path, I would set up my do-file as
Code:
version 15 rqrs findname dm0048_3 , from(sj15-2) …
Because my do-files would only work if rqrs was installed, I would add the core of rqrs.ado explicitly near the top of my do-file
Code:
version 15
capture noisily which rqrs
if ( _rc ) {
capture window stopbox rusure "Do you want to install rqrs?"
if ( _rc ) exit 111
ssc install rqrs
}
rqrs ...which_version is an alternative to Stata’s which command that returns the location (full path and filename) of a command and, additionally, tries to extract the programmer’s version number. Here is an example
Code:
. which_version findname
c:\ado\plus/f\findname.ado
*! 1.0.4 NJC 24 March 2014
. sreturn list
macros:
s(fn) : "c:\ado\plus/f\findname.ado"
s(version) : "1.0.4"Best
Daniel
0 Response to Two new programs, -rqrs- and -which_version-, available from SSC
Post a Comment