Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Writing a help file

    Hi Statalisters,

    I am not sure whether I should post my question in the Mata forum. But I think Statalisters in this forum have a higher probability to have experience in writing a help file.

    Currently I can only write a help documents by using .sthlp file. But users may need to have this .sthlp file in the current working directory to use the following command line.
    Code:
     help commandname
    I am wondering whether there is a way to put this help file online.

    I also want to know how I can make it possible for users to download the .do file written by me in Stata, just like the ssc install command. Thank you guys!
    Last edited by Ingrid Qiu; 26 Sep 2015, 06:23.

  • #2
    See

    Code:
    help syntax
    help program
    help smcl
    For relevant/related documentation and http://repec.org/bocode/s/sscsubmit.html for information about submitting to SSC. Typically, you'll want to use an ado file for distribution which would facilitate defining programs (e.g., functions or procedures in other languages) and will allow the file to both define and execute the program; for example, if you define a program in the do file that you wanted to expose to the end user, you would first need to run the script to define the program and then would need to call the program, while ado files avoid this altogether.

    Comment


    • #3
      Thank you for the information.

      That is to say, if I submit the ado file, then user cannot go back to the code to do any modification. That will require a thorough test to the code before submitting to SSC.

      Comment


      • #4
        Not true at all:

        Code:
        ssc inst brewscheme
        doedit `"`c(sysdir_plus)'b/brewscheme.ado"'
        The only possible case where it would be true is if you only distributed a pre compiled Mata program and did not include the source code as part of the pkg file. The brewscheme program also includes a Mata function defined in recycle.mata, as well as the compiled Mata function. If your goal is to collaborate, you are better off using tools designed to manage the version control of the source code like Git, SVN, CVS, etc. For example, if you wanted to contribute to the brewscheme code base, you could alter the code and submit a pull request at https://github.com/wbuchanan/brewscheme.

        Comment


        • #5
          Ingrid: This thread really should have been posted in the General forum. The Mata forum is for threads centred on the use of Mata. Please don't try to make other distinctions.

          Comment


          • #6
            Originally posted by Nick Cox View Post
            Ingrid: This thread really should have been posted in the General forum. The Mata forum is for threads centred on the use of Mata. Please don't try to make other distinctions.
            Okay, I see. Thank you for reminding me!

            Comment

            Working...
            X