Bookmark and Share

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]

st: RE : st: RE: st: RE : st: Insheet Issue


From   "Vezzani, Antonio (EST)" <Antonio.Vezzani@fao.org>
To   Steve Samuels <sjsamuels@gmail.com>, statalist@hsphsun2.harvard.edu
Subject   st: RE : st: RE: st: RE : st: Insheet Issue
Date   Tue, 14 Sep 2010 16:42:57 +0200

Problem solved, finally!..but it will be a mistery for me...
I tried everything, also deleting column by column. What is really strange is
that I can import the full dataset only if I limit the choice to 31 variables
(numbers and strings), the good news is that I have the possibility to test
some aggregate figures and everything is fine.
Thanks
A.
-------- Message d'origine--------
De:	Steve Samuels [mailto:sjsamuels@gmail.com]
Date:	mar. 14/09/2010 10:19
À:	statalist@hsphsun2.harvard.edu; Vezzani, Antonio (EST)
Cc:	
Objet:	Re: st: RE: st: RE : st: Insheet Issue

--
-Antonio,  I see that the questions in my last post weren't helpful or
responsive to your problem.  I'm very sorry.

Are the 164502 lines that you have read so far okay? If you've
obtained a good editor or file viewer, can you see the valid lines in
the original file beyond these? Roy Wada's -chewfile- (SSC) has an
option for reading a specific range of lines and might help. If the
file is corrupted, as Michael suggests, then solutions seem more
limited. Electronic transmission can be one possible source of
corruption. Perhaps you can obtain a freshly made copy, zipped up. Or,
if the file was output by another program (e.g. SAS, SPSS), perhaps
you can get a copy in the original format and use a file conversion
tool like StatTransfer.

Best of luck,

Steve

Steven J. Samuels
sjsamuels@gmail.com





On Mon, Sep 13, 2010 at 8:08 PM, Steve Samuels <sjsamuels@gmail.com> wrote:
> --
>
> Antonio: What's the origin of the file you are insheeting?   Are you
> sure it isn't a data file in the internal format of some statistical,
> spreadsheet, or database program?  If not, where do the extraneous
> characters come from?  And, why do you believe that what remains will
> be "real" data?
>
> Steve
>
> Steven J. Samuels
> sjsamuels@gmail.com
> 18 Cantine's Island
> Saugerties NY 12477
> USA
> Voice: 845-246-0774
> Fax:    206-202-4783
>
> On Mon, Sep 13, 2010 at 5:04 AM, Vezzani, Antonio (EST)
> <Antonio.Vezzani@fao.org> wrote:
>> Dear Micheal,
>> After an inspection (hexdump) I have run this lines:
>>
>> **************************
>> local asci "^E \n ^K \r ^S ^T ^X ^Y ^Z 28 29 128 E^A E^B E^C E^D E^E E^H
E^J
>> E^L E^N E^Q E^R E^S E^T E^U E^V E^W E^Y E^Z 156 160 ¡ ¢ £ ¤ § ¨ ª "  ­ ® ¯
°
>> ² ´ · ¸ º " ½ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý
Þ ß
>> à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý 255"
>>  foreach x of local asci {
>>                filefilter "XXX.txt" YYY.txt, from("`x'") to("") replace
>>        }
>>
>> insheet using YYY.txt, delimiter("|")
>> **************************
>>
>> Basically I've deleted all the possible problems, but still just 164502
lines
>> are uploaded :-(  What can I do?
>> (in any case, for instance, thank you for the new interesting commands
>> suggested)
>>
>> Antonio
>>
>> -----Original Message-----
>> From: owner-statalist@hsphsun2.harvard.edu
>> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Michael N.
>> Mitchell
>> Sent: Saturday, September 11, 2010 9:52 PM
>> To: statalist@hsphsun2.harvard.edu
>> Subject: Re: st: RE : st: Insheet Issue
>>
>> Dear Antonio
>>
>>   I would suggest checking out the -hexdump- and -filefilter- commands
>> within Stata. The
>> -hexdump- command, with the -analyze- option will give you a kind of
>> frequency
>> distribution of all of the different characters in your file. This will
allow
>> you to
>> identify any nasty bits in your file (i.e., non-ASCII characters).
>>
>>   You can then use the -filefilter- command to convert those nasty
>> characters into
>> something more innocuous (that would not bother -insheet-).
>>
>>   This solution takes a little time and patience, but I think it will get
>> you to where
>> you want to go.
>>
>> Best luck!
>>
>> Michael N. Mitchell
>> Data Management Using Stata      -
http://www.stata.com/bookstore/dmus.html
>> A Visual Guide to Stata Graphics -
http://www.stata.com/bookstore/vgsg.html
>> Stata tidbit of the week         - http://www.MichaelNormanMitchell.com
>>
>>
>>
>> On 2010-09-11 12.42 PM, Vezzani, Antonio (EST) wrote:
>>> I checked the file: in the last row uploaded there is an arrow in a cell
>>> string, I've tried to delete it but still doesn't work, and the null
cells
>>> are already empty...any other suggestion?
>>>
>>>
>>>
>>> -------- Message d'origine--------
>>> De:   owner-statalist@hsphsun2.harvard.edu de la part de Ronan Conroy
>>> Date: sam. 11/09/2010 18:35
>>> À:    statalist@hsphsun2.harvard.edu
>>> Cc:
>>> Objet:        Re: st: Insheet Issue
>>>
>>> On 10 MFómh 2010, at 21:46, Jeph Herrin wrote:
>>>
>>>>
>>>> Perhaps an embedded | or<carriage return>; or an empty
>>>> row. Have you tried inspecting line 164,502 of the ASCII file?
>>>
>>> Another nightmare character is the 'Null' character.
>>>
>>> Try opening your data in a text editor and giving a 'convert to ASCII'
>>> command.
>>>
>>> If you don't have a text editor that does this, you might look at the
>>> text editor FAQ and get one as a priority. Very useful for data
>>> cleaning!
>>>
>>>
>>>
>>> Ronán Conroy
>>> Associate Professor
>>> Division of Population Health Sciences
>>> =================================
>>>
>>> rconroy@rcsi.ie
>>> Royal College of Surgeons in Ireland
>>> Epidemiology Department,
>>> Beaux Lane House, Dublin 2, Ireland
>>> +353 (0)1 402 2431
>>> +353 (0)87 799 97 95
>>> +353 (0)1 402 2764 (Fax - remember them?)
>>> http://rcsi.academia.edu/RonanConroy
>>>
>>> P    Before printing, think about the environment
>>>
>>>
>>>
>>>
>>>
>>> *
>>> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index