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: insheet problem (Stata 10.1)
From
scott hankins <[email protected]>
To
[email protected]
Subject
Re: st: insheet problem (Stata 10.1)
Date
Wed, 30 Mar 2011 12:47:45 -0400
Thank you Robert and Nick. I will file this away for the next time I
run across an issue like this.
scott
On Wed, Mar 30, 2011 at 10:25 AM, Nick Cox <[email protected]> wrote:
> It's not what you want, but it's the rule in Stata.
>
> Double quotes " " bind more strongly than separators separate.
>
> As Robert says, zap the ".
>
> On Wed, Mar 30, 2011 at 2:44 PM, Robert Picard <[email protected]> wrote:
>> I think the problem is that a number of records include double quotes,
>> some with a single double quote (see line 30926 => | DR ANDREW ALPERT,
>> DMD "PERIODO| ). If I do a global replace of all double quotes with
>> nothing, then -insheet- reads the file correctly. I'm guessing that
>> what happens here is that -insheet- sees the unmatched double quote
>> and starts eating lines until it finds the next double quote. Not the
>> expected behavior so I think you should forward the problem to Stata
>> technical support.
>>
>> Robert
>>
>>
>>
>> On Wed, Mar 30, 2011 at 8:13 AM, scott hankins <[email protected]> wrote:
>>> Hello everyone
>>>
>>> I have an "issue" with insheet using Stata 10.1 that I hope someone
>>> can help me to diagnose.
>>>
>>> I have downloaded the file at this location
>>> (ftp://ftppub.doh.state.fl.us/ldo/data/licensee_profile.txt), it is a
>>> pipe ("|") delimited file.
>>>
>>> When I type
>>> - insheet using "licensee_profile.txt", delimiter("|") Stata tells me
>>> I have (42 vars, 97543 obs)
>>> the last variable (v42) is "empty"
>>>
>>> When I type
>>> - infix str var 1-1000 using "licensee_profile.txt" Stata tells me I
>>> have (145353 observations read) with the first observation being the
>>> variable names.
>>>
>>> If I open the file in a text editor (jedit), there are 145353 rows, so
>>> that matches infix results. I can open the file in Excel and re-save
>>> as a tab delimited file and then use -insheet without any problems
>>> (i.e. there are 145352 observations and 41 vars). Doing things this
>>> way "solves" my problem, but I would like to know what is giving Stata
>>> problems so I can deal with this in the future. How would I even go
>>> about diagnosing the problem?
>>>
>>> thank you
>>>
>>> Scott Hankins
>>> *
>>> * 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/