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]

From |
Steve Samuels <sjsamuels@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

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 sjsamuels@gmail.com 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 <downeyd@gvsu.edu> 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" <sedging@ucla.edu> 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: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Davia Downey Sent: Thursday, June 14, 2012 1:15 PM To: statalist@hsphsun2.harvard.edu 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/

**References**:**st: Insheet Command Problem***From:*Davia Downey <downeyd@gvsu.edu>

**st: RE: Insheet Command Problem***From:*"Sarah Edgington" <sedging@ucla.edu>

**Re: st: RE: Insheet Command Problem***From:*Davia Downey <downeyd@gvsu.edu>

**Re: st: RE: Insheet Command Problem***From:*Richard Herron <richard.c.herron@gmail.com>

- Prev by Date:
**Re: st: RE: Insheet Command Problem** - Next by Date:
**Re: st: RE: Insheet Command Problem** - Previous by thread:
**Re: st: RE: Insheet Command Problem** - Next by thread:
**st: net from an https site** - Index(es):