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 |
"Sarah Edgington" <sedging@ucla.edu> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: RE: Insheet Command Problem |

Date |
Thu, 14 Jun 2012 16:39:00 -0700 |

Davia, I don't know what you mean by "use the drop command with insheet." There is not a drop option with -insheet- if that's what you're asking (type -help insheet- to see what options you can specify). You can use the -drop- command after insheet, but that won't help you if you can't read the whole file. Stat Transfer might be your ideal option here. It will let you read a delimited file and output a subset of the variables as a Stata file. However, you again do not specify the actual error messages you receive. Are you actually getting a no room to add more variables error or is Stata telling you something else? There are a lot of things that can go wrong in creating a comma-delimited file so I would not automatically assume without reading the error message that memory is the problem. I'd be really surprised if you couldn't -insheet- a 1.2MB file unless something else is wrong with it. You initially said the dataset was more than 500MB and that I could see causing problems. Raw text files are smaller than Stata files so it's no surprise that you need more memory than the size the .csv file takes up on disk, no matter what that size may be. Additionally, you should note in the FAQ that you are requested to specify what version of Stata you're using if not the current version. Set memory is no longer necessary in Stata 12 so I assume you must be using an earlier version. Hope that helps. -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 4:01 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: RE: Insheet Command Problem Sarah, Do you know if I can use the drop command with insheet? It seems there's a problem with the size of the memory I'm setting. Even when I go up to 2g (it's only a 1.2 MB size file), it still won't read the entire file. Davia 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 49504Email: downeyd@gvsu.edu On 6/14/12 6:08 PM, "Sarah Edgington" <sedging@ucla.edu> wrote: >Davia, >I'm pretty sure the "error in line 4508597 of file" is a red herring. >The entire error you're seeing is because specifying fewer variable >names than there are variables in varlist is invalid syntax. As an >experiment I tried doing the same thing with a csv file that I know >works fine with -insheet- if I don't give a variable list. When I >specified a subset of the variables in the varlist (that is, when I >used the invalid syntax) I got the error >message: >too few variables specified >error in line 2534 of file > >Since there are 2,534 lines in the file I was trying to -insheet- my >suspicion is that what Stata is really saying is "I got to the very end >of the file and I still couldn't figure out how you wanted me to fit >all these variables into seven variable names, sorry." > >You say that using -insheet- for the whole file "still doesn't seem to >work." What is the actual error message you get? It sounds like the >file is large enough that maybe it could be a memory issue but it's >worth figuring out if there is some other problem with the file before >trying to deal with that. > >-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 2:21 PM >To: statalist@hsphsun2.harvard.edu >Subject: Re: st: RE: Insheet Command Problem > >When I have TextEdit look for the line 4508597 it says it's an invalid >line number. Is there a way I can rearrange the file in text edit in >order to read each line separately? > >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 49504Email: downeyd@gvsu.edu > > > > > > > > > >On 6/14/12 5:01 PM, "Richard Herron" <richard.c.herron@gmail.com> wrote: > >>4508597 > > >* >* 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**:**RE: st: RE: Insheet Command Problem***From:*"Sarah Edgington" <sedging@ucla.edu>

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

- 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:
**RE: st: RE: Insheet Command Problem** - Index(es):