How can I remove from a STRING VARIABLE all characters that are not part of a predefined list? For example, the predefined list contains the characters 1, 2, 3, A, B, and C. If the STRING is "12A", it does not change; but if it is "14A", it will change to "1A" because "4" is not in the list. In short, I do not want to define the characters to delete but the characters to keep. Thanks
Related Posts with How to remove all characters that are not part of a predefined list?
Reverse CommandI am trying to reverse the order of some categorical variables in my dataset. There was previously a…
Selecting values from panel dataI have data on visits to a clinic. In the example below, "value date" is the date of the clinic visi…
Solving complex equations with STATADear Statalists, can anybody help me solve equations with STATA? In particular, I have one equation …
combining dates in 2 different columnsDear Stata forum members, I need advise on how to combine dates in 2 different columns in to one co…
Westerlund ECM panel cointegrationGood morning, I would like to apply a Westerlund and Edgerton (2007) panel bootstrap cointegration t…
Subscribe to:
Post Comments (Atom)
0 Response to How to remove all characters that are not part of a predefined list?
Post a Comment