Announcement

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

  • Making Do File Accessible to Anyone

    Hi,

    I would like to make my do file accessible to any user to be able to run my data from that do file? I think I start with the change directory command (cd) but I'm not sure of the process. Can anyone help me?

  • #2
    Now your criterion of "accessible to anyone" is "accessible to anyone with the same operating system and with a particular file structure". Is that what you want?

    Comment


    • #3
      Yes

      Comment


      • #4
        If there is a directory accessible to ‘anyone’; if the do file is saved in this directory; if ‘anyone’ who starts dealing with the data selects this as the working directory; the I guess - do - command will do fine.
        Best regards,

        Marcos

        Comment


        • #5
          Thanks, Marcos. I am not finding an example of the I guess do command. Would you be able to provide an example of the proper syntax for this command?

          Comment


          • #6
            Marcos meant, I think,

            then, I guess, the do command will work fine

            Comment


            • #7
              Correctly guessed, Nick. I typed in a smartphone and didn't have the time to check for mistyping errors.

              Just to explain to Roman, if the do-flie name is "mydo.do", you need to type:

              Code:
              . do mydo
              Last edited by Marcos Almeida; 28 Jun 2018, 09:08.
              Best regards,

              Marcos

              Comment


              • #8
                Thank you.

                Comment


                • #9
                  On the general issue, one way to make a do file maximally useful includes

                  (a) including absolutely no file or directory references

                  (b) supplying data separately

                  (c) letting the users take full responsibility for where they work.

                  That's pretty much how most good Stata commands work!

                  Comment


                  • #10
                    Exactly! Thank you.

                    Comment

                    Working...
                    X