Print log file stata




















There are two ways to open a Viewer window:. Click on the Log button, and select the file you want to open. Then the text in your log file will be opened in the Viewer window:. You can copy and paste the text between the Viewer and anything else that uses text, such as word processors and text editors. You can even paste into the Command window or the Do-file Editor. This is to clear any data that Stata is currently working with.

After I specify the data file, I enter the rest of the commands I want to run. Within this file, Stata will assume that each line is a new command unless you tell it otherwise. That tells Stata that the next line is part of the same command. In addition to recording all of your commands in a do-file, you can also have Stata create a copy of everything that is sent to the Results window, with the exception of graphs.

This is called a log file and can be helpful for you to save all of your output. This will also retain your commands, although it will not save them in the same way a do-file does they will be embedded in the output.

The default in Stata is to save the file with the extension. This will allow you to open the log file in Stata, but other programs will not read this type of file. The other extension available is. This file format will allow you to open your log file in other programs and may be easier to manage than the.

To save it as a. The methods discussed in this page capture all of the output that appears in the Results window, if you want to copy selected parts of the output, the method described in How do I Copy Stata Output and Stata Graphs into Word? Which of the methods described below is more appropriate will depend on the situation.

The advantage of the first method, using a log file, is that a log file will capture all of the output from the time you open the file until you close the file, regardless of how much output is produced.

The second method, which uses the translate command only captures the output currently in the scroll buffer i. At the start of your session, you can start a log file, and then at the end of your session you can close the log file. This log contains the commands you typed and the output produced. For example,. Then, the file homework. You can open this file in Microsoft Word and edit it, but there are a couple of tricks. First, you need to point Word to the folder directory where homework.

By default, Word only shows you Word documents i. For example, in the screen below we have pointed Word to the right folder, but we cannot see homework. You can then edit this file.



0コメント

  • 1000 / 1000