Agriculture Reference
In-Depth Information
Figure 2.4
Importing data created in a spreadsheet program on a Windows computer.
row can be the variable labels, but the remainder of the spreadsheet
must be the data only. If you have a spreadsheet with header informa-
tion, such as experiment name, date, etc., this method won't work.
Selecting Text data created by a spreadsheet allows the importation of
such files (Figure 2.4).
The file name can be typed in the 'Text dataset filename: field or
click the Browse…' button to open a standard file dialog, find the file,
click open, and the pathname is entered into the field. Remember,
if you type the file name yourself, you will have to type the entire
pathname. This can get quite convoluted if the file is buried several
subdirectories deep. One way to avoid this is to change the working
directory. Then, all you have to do is type the actual filename with
its file extension if it is not the extension .raw. There are several other
options available with this command including changing the storage
type, variable labels, and the delimiter.
Try this function. Select the Text data created with a spreadsheet
under File/Import. Then navigate to the file Variety 2000 Test Data
.txt. There are several different file extensions this importing method
supports including comma separated values (.csv), text files (.txt), and
raw files (.raw). All of these are types of text files. This is a file that
was originally created in Excel and saved as a text file. Once you have
loaded it into Stata, you can view the data by selecting the Data Editor
Search WWH ::




Custom Search