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 on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Insheet drops some part of long characters


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Insheet drops some part of long characters
Date   Sat, 25 Jun 2011 06:53:40 +0100

This isn't surprising. You don't show the exact syntax you used,
contrary to Statalist advice, but evidently -insheet- is trying on
your behalf to put everything in a string variable,

But it can't go above -str244-, which is the limit in Stata 11. That
is why it stops where it did, if you (or better a good text editor) do
the counting.

With your example data in a one-line file, I found that

insheet using c:\data\kim.dat, delimiter(;) clear nonames

works as intended. That way, you specify in advance that your data are
separated by semi-colons and there is no need for -split-, excellent
command though it undoubtedly is.

Nick

On Fri, Jun 24, 2011 at 11:05 PM, Mike Kim <kalisperos@gmail.com> wrote:

> I tried to import a long list of authors with other variables using insheet:
>
> insheet using "C:\Data\authors.csv", clear
>
> I found that Stata (IC, ver. 11) imports only up to "East" of
> "Easton,Geoff" in the last line of the following data, for example. Is
> there any way I can import all characters? I plan to split the names
> by semicolon(;) using "split" command.
>
> Data example:
> Shoham,Aviv;Rose,Gregory
> M.;Bakir,Aysen;Meng,Lufang;Brembeck,Helene;Mandrik,Carter
> A.;Fern,Edward F.;Bao,Yeqing;Chang,Chingching;Cook,Daniel
> Thomas;Kim,Jonathan S.;Baek,Seung;Cho,Sungbin;Mulvey,Michael
> S.;Stern,Barbara B.;McLoughlin,Damien;Easton,Geoff;Wakefield,Kirk
> L.;Stone,George W.;Anderson,Laurel
>
*
*   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