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
Calculating Age Using DatesIn Stata, I need to calculate the age of a patient at the last check-up by using the date of birth a…
How to obtain confidence intervals for weighted median survival time Hello, I am seeking for guidance on how to calculate or obtain the confidence intervals for weighte…
Interpreting multiplicative interaction in StataDear all, I am interested in evaluating if there is multiplicative interaction between one categori…
Question on merging datasets with duplicatesHello all, I have a question regarding merging files with duplicates. I suspect the solution is quit…
Assessing model using svy dataDear Statalist community, I am using a nationwide dataset with survey sampling to determine a speci…
Subscribe to:
Post Comments (Atom)
0 Response to Drop last 7 characters from obsrevations if they have certain characters
Post a Comment