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?
Thanks,
Eric
>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] 1.3.13.9.
>
>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.
>
>Nick
>[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
Econalytics
2535 Sherwood Road
Columbus, OH 43209
ph: 614.231.5034
cell: 614.330.8846
eFax: 614.573.6639
eMail: [email protected]
website: http://www.econalytics.com
====================================================
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/