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: Insheet Issue


From   "Vezzani, Antonio (EST)" <Antonio.Vezzani@fao.org>
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: st: RE : st: Insheet Issue
Date   Mon, 13 Sep 2010 11:04:44 +0200

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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index