Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: RE: Insheet Command Problem


From   Steve Samuels <[email protected]>
To   [email protected]
Subject   Re: st: RE: Insheet Command Problem
Date   Thu, 14 Jun 2012 17:42:28 -0400

If you are on Unix, Mac OS X, or Linux, use -awk-.
See: hhttp://www.stata.com/statalist/archive/2009-01/msg00802.html.
If you are on Windows, a google search for "Windows awk" will turn
up a number of options. Consider also David Elliot's -chunky- at SSC.

Steve
[email protected]


On Jun 14, 2012, at 5:01 PM, Richard Herron wrote:

There may be an extra comma on line 4508597. Inspect this and the
adjacent lines in a text editor.

Richard Herron


On Thu, Jun 14, 2012 at 4:49 PM, Davia Downey <[email protected]> wrote:
The dataset is over 500Mb but even when I use the set memory command it still doesn't seem to work.

Davia Cox Downey

On Jun 14, 2012, at 4:46 PM, "Sarah Edgington" <[email protected]> wrote:

Davia,
Insheet doesn't allow you to pull in a subset of the data.  The [varlist] in
insheet is used when you want to declare the names that Stata should use
when importing the data, but if you do specify a varlist it has to contain
names for every variable.

Is the file too big to simply insheet the whole thing?  It seems to me like
the easiest solution would be to keep the variables of interest after
reading the entire data set.  Of course if the data is prohibitively large
that won't work.

Do you have any options about what format that data comes in?  If the data
were fixed width instead of comma delimited you could use infile to just
read the columns of interest.

-Sarah

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Davia Downey
Sent: Thursday, June 14, 2012 1:15 PM
To: [email protected]
Subject: st: Insheet Command Problem

Hello All,

I need to truncate a very large census file. I only need a few variables
from the file so I am using the in sheet command with the variables I want
read in listed in the command. However, the file still isn't loading. The
error code I keep getting back is not helpful and the file is too large to
open in Excel.

The code I use is:
insheet year quarter county earnhiras earnhirns hiras hirn using
"qwi_la_se_county_naics3_all.csv", names


The error I get is:

too few variables specified
error in line 4508597 of file


Is there something else I can try? I really need to get at this data and ca=
nnot for the life of me figure out what other command to use to pull out th=
e specific data/variables I need.


Davia Cox Downey
Assistant Professor of Public Administration School of Public, Nonprofit &
Health Administration Grand Valley State University



242C DeVos Center
401 West Fulton Street
Grand Rapids, MI  49504


*
*   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/

*
*   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/

*
*   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/

*
*   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/


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index