Object Reference : Object View and Procedure Reference : Pool
Import data from a foreign disk file into a pool object.
May be used to import data into an existing workfile from a text, Excel, or Lotus file on disk.
Note: we strongly recommend that you instead of using this proc, you use wfopen or pageload to read the source data into a panel structured workfile and pageunstack if desired.
pool_name.read(options) [path\]file_name pool_ser1 [pool_ser2 pool_ser3 ...]
You must supply the name of the source file. If you do not include the optional path specification, EViews will look for the file in the default directory. Path specifications may point to local or network drives. If the path specification contains a space, you may enclose the entire expression in double quotation marks.
Follow the source file name with a list of ordinary or pool series.
Force the dialog to appear from within a program.
File type options
t=dat, txt
ASCII (plain text) files.
t=wk1, wk3
Lotus spreadsheet files.
Excel spreadsheet files.
If you do not specify the “t” option, EViews uses the file name extension to determine the file type. If you specify the “t” option, the file name extension will not be used to determine the file type.
Options for ASCII text files
Read data organized by series. Default is to read by observation with series in columns.
Specify text for NAs. Default is “NA”.
Treat tab as delimiter (note: you may specify multiple delimiter options). The default is “d=c” only.
Treat comma as delimiter.
Treat space as delimiter.
Treat alpha numeric characters as delimiter.
custom = symbol
Specify symbol/character to treat as delimiter.
Treat multiple delimiters as one.
Series names provided in file.
Number of lines between the header line and the data. Must be used with the “name” option.
rect (default) / norect
[Treat / Do not treat] file layout as rectangular.
skipcol = integer
Number of columns to skip. Must be used with the “rect” option.
skiprow = integer
Number of rows to skip. Must be used with the “rect” option.
comment= symbol
Specify character/symbol to treat as comment sign. Everything to the right of the comment sign is ignored. Must be used with the “rect” option.
Strings are in single quotes, not double quotes.
Do not treat strings as NA; simply drop them.
Treat numbers in parentheses as negative numbers.
Allow commas in numbers (note that using commas as a delimiter takes precedence over this option).
currency= symbol
Specify symbol/character for currency data.
Options for spreadsheet (Lotus, Excel) files
Read data organized by series. Default is to read by observation with series in columns.
letter_number (default=“b2”)
Coordinate of the upper-left cell containing data.
Sheet name for Excel 5–8 Workbooks.
Options for pool reading
bycross (default) / byper
Structure of stacked pool data [cross-section / date or period] (only for pool read).
pool1.read(t=dat,na=.) a:\mydat.raw year lwage? hrs?
reads stacked data from an ASCII file MYDAT.RAW in the A: drive. The data in the file are stacked by cross-section, the missing value NA is coded as a “.” (dot or period). We read one ordinary series YEAR, and three two pool series LWAGE? and HRS?.
pool1.read(a2,s=sheet3,byper) statepan.xls inc? educ? pop?
reads data from an Excel file STATEPAN in the default directory. The data are stacked by period in the sheet SHEET3 with the upper left data cell A2. We read three pool series INC? EDUC? and POP?.
See “Creating a Workfile by Reading from a Foreign Data Source” and “Importing Data” for a discussion and examples of importing data from external files.
“Working with Panel Data” describes panel data alternatives to working with pooled data.
See also pageload and wfopen and Pool::write.