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
GSEM NLCOM and BootstrappingHi everyone, after some thorough searching on my own, I think I need a little nudging in a helpful d…
Confidence interval in survey analysisDear all, I have been analyzing survey data in Stata, and I encounter a problem regarding value of …
Reshaping data with multiple obs per idDear Stata users, I have the following panel data set covering all 50 states over 13 years. Code:…
problem of mixed fontface for graphHello. When I generate a graph, I want all numbers and english characters in the fontfact of "times …
Keeping observations from the using data in a 1:1 mergingI am trying to merge the results of students in different subjects over two years using 1:1, however…
Subscribe to:
Post Comments (Atom)
0 Response to Replace when a string variable is longer than 4 characters
Post a Comment