Dear all,
I would like to replace a string variable which is longer than 4 digits with numbers. For example, if variable A has "swimming", "karate", "kickboxing", "basketball" then I want to change them into number 4 as they are longer than 4 characters. But not for "car" as it is shorter than 4.
Many thanks in advance. Kim
Related Posts with Replace when a string variable is longer than 4 characters
Delta method toHello I am using stata 14 and the mixlogit command (user install) to analyse data from a discrete c…
checking string similarity within the same variableDear all, This message was initially posted in the discussion thread HTML Code: https://www.stata…
Suppressing dummy variables in regression output tableHello! I have run a regression which contains several dummy variables which I would like to exclude…
Splitting wordsHi Everyone, Bellow an example of the data I have. I need to use only the cities "City" and drop "C…
Graph optionsArray Dear Stata users, I am wondering is it possible to control the size of the second label (num…
Subscribe to:
Post Comments (Atom)
0 Response to Replace when a string variable is longer than 4 characters
Post a Comment