Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: why is lookfor acting up?


From   Anna G <[email protected]>
To   [email protected]
Subject   st: why is lookfor acting up?
Date   Fri, 14 Jul 2006 16:31:42 -0700 (PDT)

Dear all,
what is happening? 

. lookfor depend
Unknown function ()
r(133);
 
It's installed, the ado file is there (copied below, never touched it). Thank you! 
Best,
Anna
 
*! version 3.2.0  28jun2001
program define lookfor, rclass
 version 7
 if `"`0'"' == "" { error 198 }
 local i 1
 while `"``i''"' != "" {
  local look`i' = lower(`"``i''"')
  local i = `i'+1
 }
 local nlook = `i'-1
 local 0 "_all"
 syntax varlist
 foreach v of local varlist {
  local lbl : variable label `v'
  local touse 0
  forvalues j = 1/`nlook' {
   if index(lower(`"`v'"'),`"`look`j''"') /*
    */ | index(lower(`"`lbl'"'), `"`look`j''"') {
    local touse 1
    continue, break
   }
  }
  if `touse' {
   local list "`list' `v'"
  }
 }
 if "`list'" != "" {
  describe `list'
  return local varlist `list'
 }
end
exit
3.2.0  ported to Stata 7
       lookfor now returns varlist in r(varlist)
*
*   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/



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