Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: number of words in a text list

From   "Eric G. Wruck" <[email protected]>
To   [email protected]
Subject   RE: st: number of words in a text list
Date   Tue, 12 Jul 2005 09:55:38 -0400

Thanks for clearing that up Nick.  I had thought that Florence might be using a different version of Stata & therefore couldn't find wordcount().  Without having all the old manuals around, is there a way to know when a function or Stata ado was released?



>Eric seems to invoke here a common misconception, the
>idea that -version #- sets the clock back
>to version #.
>As it happens, -wordcount()- was introduced
>in Stata 8, as was documented in its [U]
>If the misconception were really true, then
>-version 1- would certainly disable e.g.
>Windows features, which long postdate version 1.
>What -version- does is set the clock back very
>selectively in respect of key capabilities.
>In this case, what is of much longer pedigree is
>local n : word count "<string>"
>which may be what Florence wants.
>[email protected]
>Eric G. Wruck
>> I found it in Stata 9.0 by typing <help word> & then by
>> clicking on <string functions>.  Apparently, wordcount() has
>> been around since Stata 1 as I was able to use it in a little
>> .do file that specified version 1.  In the new Stata manuals
>> flip to page 173 of the Data Management manual.
>> >>How about the wordcount() function.  Here's an example:
>> >>>also, is there a way to count how many WORDS are in a
>> string without making a loop to go through the string and
> > check that way ( I want something faster).



       Eric G. Wruck
       2535 Sherwood Road
       Columbus, OH  43209

       ph:      614.231.5034
       cell:    614.330.8846
       eFax:    614.573.6639
       eMail:   [email protected]

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index