I have a variable named S_Kx, S_Jx S_Yx, S_Sx
I want to nix all variables that dont' have the same beginning as they do with after _ (i.e. S_Sx would be kept, but S_Kx and all others would be dropped)
therefore
v_vx would be kept
!v_vx would be dropped
v can be ANY letter of the alphabet
how could I approach this?
Related Posts with Comparing string variable names
How to convert a date into numerical for subtractionDear members I have the following date: 12-Dec-15 and would like to convert it to numerical so I ca…
calculate score in StataHello, I gave variables like this: Array Which means: 0. Not using 1. Pill 2. IUD 3. Inje…
Generating Quarters from date variableHi All, I want to generate quarters in my data set. I have my date variable in the D-M-Y format. I …
reg2hdfespatialDear all, I want to use this link to install the user-written command -reg2hdfespatial-in Stata. ht…
Export variance covariance matrix to csv fileFor example, sysuse auto, clear I want to export the variance - covariance of variable price mpg h…
Subscribe to:
Post Comments (Atom)
0 Response to Comparing string variable names
Post a Comment