Announcement

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

  • log commands

    Is it possible to log which commands are invoked by a do-file? Interested in the frequencies of commands including user-written in use for different tasks regardless of command name abbreviation. Thanks. Jakob

  • #2
    To do that you would need a list of all commands. How one could obtain such a list was discussed previously on Statalist.

    Comment


    • #3
      Thanks - some interesting discussion under ALL Commands. The idea was slightly different - I wondered whether it would be possible to create a log file that only logged whatever commands are invoked by a given do-file? An alternative could be to do some text mining of the do-file as a text file. In that case the aliases offered by the lists in getcmds would be useful (g ge ..... generate, etc.).

      Comment


      • #4
        -cmdlog- should do the job.
        Info is here: u15.pdf (stata.com)
        However, cmdlog does not seem to work.
        HTML Code:
        cmdlog using session
        use http://www.stata-press.com/data/r13/census5
        tabulate region [freq=pop]
        summarize median_age
        cmdlog close

        Comment


        • #5
          See help for cmdlog.
          cmdlog and its subcommands are similar to log but create a command log recording only what you type and can be only plain text. That is, cmdlog is designed only for interactive use. You can have only one command log open at a time.

          Comment

          Working...
          X