Bookmark and Share

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


From   Steve Samuels <[email protected]>
To   [email protected]
Subject   Re: st: RE: st: RE : st: Insheet Issue
Date   Mon, 13 Sep 2010 20:08:43 -0400

--

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
[email protected]
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)
<[email protected]> 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: [email protected]
> [mailto:[email protected]] On Behalf Of Michael N.
> Mitchell
> Sent: Saturday, September 11, 2010 9:52 PM
> To: [email protected]
> 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:   [email protected] de la part de Ronan Conroy
>> Date: sam. 11/09/2010 18:35
>> À:    [email protected]
>> 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
>> =================================
>>
>> [email protected]
>> 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index