Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: data import/varname problem


From   Jeph Herrin <stata@spandrel.net>
To   statalist@hsphsun2.harvard.edu
Subject   st: data import/varname problem
Date   Tue, 10 Jul 2012 14:43:04 -0400

I have a dataset that comes to me in two files. Both are comma separated files: one is the header (list of variable names) and the other is the data. My problem is to combine the two, so that I have variable names on the data.

If the files were smaller, I would probably just open both in Excel and insert the single row in the header file onto the top row of the data file, save, and then -insheet- the result into Stata. However in this case the number of columns (329) exceeds the maximum allowed by Excel. A second option would be to use a text editor to insert the header on the top line, but the dataset is almost 5GB, and even -vim- seems to be choking on it (it crashes after 5 or so minutes, something I have never seen -vim- do before).

I can -insheet- both files into Stata, so I have two Stata datasets, one containing data and the other containing variable names. But, having done that, I can't figure out a way to use the latter to name the variables in the former.

Any tricks I'm missing? This is US government issued data, so I can't ask for a more intelligent delivery arrangement.

thanks,
Jeph


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index