Code:
gen var2 = regexm(var1,"(stuff")
Here is a simple example:
Code:
clear sysuse auto gen ford = regexm(make, "(Ford|Linc|Merc")
Is there an obvious way to supress this error? The regexm() function appread to be a built-in function, so I don't think the function can either be edited and then ghosted as a personal function.
I also don't quite know how one would put a wrapper around the function to supress the errors. One could capture the generate function, but the errors spit out by regexm() don't appear to insert themselves into _rc, so I have no way of knowing if it failed. It would also be nice to have a wrapper for the function itself so that one doesn't need to write a new generate function.
0 Response to Is there an obvious way to supress the per observation errors which arise from a bad regexm()?
Post a Comment