Announcement

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

  • #46
    Tom Snell It takes all sorts. On the unusual occasions when I use MS Excel, this detail is among several habits that make me especially glad to be back in Stata. Attempts to read my mind are like some irritatingly yapping puppy that jumps up at you.

    Still, if StataCorp did this I imagine it would be entirely optional.

    Did you know that you can click on variable names in the Variables window?

    Comment


    • #47
      Thanks - it's mainly as a time-saver for when I have a lot of complex variable names with similar prefixes.

      I'm familiar with clicking variable names from the window - the alternative that I usually use is to lookfor the first part of the variable name (and then " desc `r(varlist)',full " to return the full variable names.

      Edit: can we at least have an animated blinking paperclip?
      Last edited by Tom Snell; 22 Nov 2017, 05:13.

      Comment


      • #48
        You can also hit the tab key when in the command line and a popup window appears with all of the variables' names in a drop-down list that you can select from. I'm not aware of any similar functionality in the do-file editor, though.

        Comment


        • #49
          Originally posted by Joseph Coveney View Post
          You can also hit the tab key when in the command line and a popup window appears with all of the variables' names in a drop-down list that you can select from. I'm not aware of any similar functionality in the do-file editor, though.
          Amazing - thank you! If you type in the first few letters before hitting tab it filters just on the matching variable names - this was exactly what I was after.

          Comment


          • #50
            I think it would be difficult, if not impossible, to incorporate into the do-file editor the kind of functionality Tom Snell is asking for. The do-editor functions largely independently of main Stata. When I open a do-file, there is no assurance that the relevant data file is currently open. Indeed, it's not clear how the do-editor would even figure out what data file to refer to for the purpose. Even if this worked at the beginning of a do-file, as the data changes due to -keep-, -drop-, -collapse- and -merge- commands over the course of the code, the advice given by a prompt could become wildly inaccurate.

            What I would find helpful, prompted by what Tom Snell said in #47, is for -describe- to be changed so that, by default, it shows the full variable names.

            Comment


            • #51
              Originally posted by Clyde Schechter View Post
              I think it would be difficult, if not impossible, to incorporate into the do-file editor the kind of functionality Tom Snell is asking for.
              Indeed - I don't think the tab expansion function would be practical beyond the command window. It works very well there and is something I'll be using a lot more now I'm aware of it!

              Originally posted by Clyde Schechter View Post
              What I would find helpful, prompted by what Tom Snell said in #47, is for -describe- to be changed so that, by default, it shows the full variable names.
              I agree - at least having fullnames as an option under lookfor would be very handy. It might also be useful for other commands such as sum that abbreviate longer variable names with a tilde (although desc `r(varlist)',full serves as a workaround here as well).

              Comment


              • #52
                Originally posted by Nick Cox View Post
                Did you know that you can click on variable names in the Variables window?
                And if you press spacebar before clicking back into the command line, State inserts the variable again. Gets me every time

                TAB doesn't though. Must remember that lifesaver!
                Stata 14.2MP
                OS X

                Comment


                • #53
                  Originally posted by Clyde Schechter View Post
                  I think it would be difficult, if not impossible, to incorporate into the do-file editor the kind of functionality Tom Snell is asking for. The do-editor functions largely independently of main Stata. When I open a do-file, there is no assurance that the relevant data file is currently open. Indeed, it's not clear how the do-editor would even figure out what data file to refer to for the purpose. Even if this worked at the beginning of a do-file, as the data changes due to -keep-, -drop-, -collapse- and -merge- commands over the course of the code, the advice given by a prompt could become wildly inaccurate.
                  RStudio has many of the functionalities Tom mentions in his post. I'm not saying that Stata should incorporate them, just that it's technically possible to incorporate them.

                  Comment


                  • #54
                    "I repeat my request that Stata buy out MPlus"
                    Wow. What an intriguing idea. I'm not sure the Mplus team would want to be bought, but it's a fascinating thought. It would not only substantially improve various forms of latent variable analyses in Stata, but also its Bayesian analyses. I have given up on using Stata for SEM, because of speed issues.
                    However (as Richard Williams already knows), anyone having access to Mplus can run it from within Stata using runmplus (add-on function written by Rich J Jones).

                    Comment


                    • #55
                      I would also like to see a programmer's function to copy from and paste into the clipboard directly from a do file.

                      Comment


                      • #56
                        Originally posted by Belinda Foster View Post
                        I would also like to see a programmer's function to copy from and paste into the clipboard directly from a do file.
                        Can you clarify or give an example of what you mean? I can interactively copy and paste from a do file, but you seem to have some sort of function in mind that would do it for you.
                        -------------------------------------------
                        Richard Williams, Notre Dame Dept of Sociology
                        Stata Version: 17.0 MP (2 processor)

                        EMAIL: [email protected]
                        WWW: https://www3.nd.edu/~rwilliam

                        Comment


                        • #57
                          Can you clarify or give an example of what you mean? I can interactively copy and paste from a do file, but you seem to have some sort of function in mind that would do it for you.
                          Richard Williams Suppose when you run a do file that you obtain the results of a calculation or a string in a local named foo (e.g. foo = 14354 or foo = "string"). Is there a way to export this result directly to the clipboard?

                          I am currently unaware of anything of the kind clipboard("foo", "copy"). Or the reverse, placing the clipboard contents in a local foo: clipboard("foo", "paste").

                          Comment


                          • #58
                            Belinda Foster I understand what you are saying you want Stata to do. But I can't envision a situation where one would want to do this (in either direction). Can you provide an example where this would come in handy?

                            Comment


                            • #59
                              If you check the programming manual, you see that dialog boxes have functions where you can copy to or from the clipboard. It is for when you construct commands using dialogues rather than just typing the command yourself. I suspect this is not what Belinda wants -- it seems like a lot of work to construct a dialogue box when you can do the same thing with a few clicks. But maybe you could make it work.
                              -------------------------------------------
                              Richard Williams, Notre Dame Dept of Sociology
                              Stata Version: 17.0 MP (2 processor)

                              EMAIL: [email protected]
                              WWW: https://www3.nd.edu/~rwilliam

                              Comment


                              • #60
                                Originally posted by Clyde Schechter View Post
                                Belinda Foster I understand what you are saying you want Stata to do. But I can't envision a situation where one would want to do this (in either direction). Can you provide an example where this would come in handy?
                                This is a no-brainer when you want to quickly use results from other programming languages in Stata. And vice versa of course.

                                Richard Williams This is overkill but A+ for creative thinking!

                                Comment

                                Working...
                                X