Hello,
This is my first post, so please excuse me.
I have one variable with observations like this:
var1
^CTGO258068
^CTCH474369
^CTSY258074
^CTDG258075
^CTGC274785
^CTAC477646
BC477646
TC477646
And another variable like this:
var2
TM-FFHAPT
ORM-FFHAPT
VOX-FFHAPT
TOR
MOR
UPG-FFHAPT
1. How do I remove ^CT from var1 if they have ^CT as prefix and
2. How do I remove -FFHAPT from var2 if they have -FFHAPT at the end.
Many thanks,
Related Posts with Drop last 7 characters from obsrevations if they have certain characters
Getting precision weighted estimates using melogitHello Statausers, I have a two-level logit model where I have used group centered variables along w…
Possible bug in -bootstrap-Currently, I only have access to Stata 11 to 14. In these releases, there appears to be a bug in boo…
Graphing a t-distributionI'd like to draw a t-distribution with mean 2, std deviation .2 and 14 degrees of freedom. Previous…
How to interpret sigma_u (between subject) and sigma_e (within subject) in Fixed-effects modelDear all, I'm running a fixed-effects model and need help interpreting sigma_u (between subject) an…
Difficulties in running xtabond2 command in stata v16Dear all, I just installed stata 16 IC and subsequently installed xtabond2 command. However, I often…
Subscribe to:
Post Comments (Atom)
0 Response to Drop last 7 characters from obsrevations if they have certain characters
Post a Comment