I have a command that I cannot run from do file, but if I copy paste to the Command box, it returns with result
Code:
/*AllList already imported*/
list AllList
1. banana
2. apple
3. canada
4. anana
/*input second list*/
input str10 FruitList
banana
anana
apple
end
levelsof FruitList, sep("$|^")
/* check whether element is in local list */
gen Check = ustrregexm(AllList, "\b^`FruitList'$\b")
it is the last line that does not work from do file,
gen Check = ustrregexm(AllList, "\b^`FruitList'$\b").If I run from do file, it returns with all "0"; but if I copy paste to Command and run, it does give me "1" for those that matched.
0 Response to Command does not work on Do-file, but can work on command box
Post a Comment