Hello,
How to express the oppsite of strpos?
How to express if variable does not belong in list?
For exemple,
gen index = "."
local levels A B C D
foreach level of local levels{
capture confirm var `level'
if _rc != 0 {
replace index = "1" if strpos(var1,"`level'")
}
}
How to express the oppsite of strpos?
How to express if variable does not belong in list?
For exemple,
gen index = "."
local levels A B C D
foreach level of local levels{
capture confirm var `level'
if _rc != 0 {
replace index = "1" if strpos(var1,"`level'")
}
}
Comment