Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Insheet Dataset Problem


From   Ted Anagnoson <[email protected]>
To   [email protected]
Subject   Re: st: Insheet Dataset Problem
Date   Mon, 09 Apr 2007 07:38:48 -0700

The example at the bottom of p. 274 of the [D] manual makes it clear that insheet expects to have all the variables specified, not too few nor too many.

You might try infile instead. You can _skip(#) any number of variables (p. 252), and p. 248 has an example with comma separated data.

Ted Anagnoson
Calif. State University, LA





At 10:05 PM 4/8/2007 -0500, Benjamin Allaire wrote:

Hi Statalisters -
I had a quick question, I'm trying to import a dataset into intercooled
stata and it contains too many variables, so I was trying to insheet the
variables I need.  It's a csv file and I tried the following command:



insheet district month year using cfy06e3.csv, c names clear


And got the following error:

too few variables specified
error in line 3934 of file
r(102);


which is odd considering there are only 3932 observations and I don't
particularly expect to get an error like this with the insheet command.
Does anyone have any good ideas on a work around?

Thanks!

Ben

_________________________________________________________________
Get a FREE Web site, company branded e-mail and more from Microsoft Office
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index