Name2002 | Name2003 | Name2004 | Name2005 | (ExpectedCurrentName) |
a | b | c | c | |
a | a | |||
x | a | x | x | |
a | a | |||
I have a string data like this example and want to catch the latest available name into the new var CurrentName. I have tried:
egen CurrentName = rowfirst(Name*)
to know that it could not be applied for string value (type mismatch notification). Please kindly advise me whether any simple command to get there, instead of a lengthy loop? Any suggestion would be highly appreciated.
Comment