Agriculture Reference
In-Depth Information
in which case, these menu items will allow you to save the Do-File
(extension .do). Datasets are saved with the .dta extension. They work
just as they would in any other program within the GUI.
The View… menu item is implemented a little differently than you
would expect for a function that opens files. When invoked, a dialog
appears that asks for a file or URL path. You can select the Browse…
button and a normal file dialog appears, which works as you would
expect. View is for viewing do, ado, and smcl files, to name a few. A
URL can be entered to access a specific Internet page. If you type a
URL address, it will open the Web page as html in a Viewer window.
If you have a URL for a particular Stata program, you can view it
directly in a Viewer window, which can be helpful.
The Do… menu item is for opening previously saved Do-Files.
Once open it can be run, which makes the file available for execution.
Executing a Do-File is done by typing do followed by the filename in
the Command region of the Main window along with any parameters
the file requires.
The Filename… item from the File menu is used to select a file-
name that is going to be part of a Stata command. Some Stata com-
mands require a filename and this menu item quickly allows you to
find and select the needed file. Filename will insert the correct path-
name with the necessary quotes into the command when selected.
The Change Working Directory… menu item allows you to
change the working directory. The working directory is where Stata
looks for files you have saved. By changing the working directory, it
makes it simpler when typing a command that requires a filename.
Ordinarily you would have to type the entire path name to the file,
which can become tedious. With the working directory changed all
that is needed is the file name. The working directory is where Stata
will also look for ado-Files that you (or others) have created. Ado-
Files are do-Files that automatically load and run when invoked.
Along with those .do and .ado files stored in the working directory,
many other of these ado-Files are part of Stata's official updates and
are stored in specific folders that Stata knows about and can find
when a specific command written as an ado-File is invoked. This is a
good reason not to mess with the Stata files that have been installed
on your computer or the hierarchy of their folders. These types of
files will be discussed at length in Chapter 7 (Programming Stata).
Search WWH ::




Custom Search