If we use Asterisk (*) at the start and type a specific text, it will find all the text that ends with that text. If we want to find the text by the first few characters, use the following.We want to find text that contains some specific characters in the middle, the follow the ...
my dates go in as string variables and I can convert them into Stata dates using something like this: generate double diagdate2 = date(dx, "YMDhms") format %td diagdate2 Which gives my data a numeric value and applies some sort of variable label. I'm familiar with how to substract/ad...
Dear all, Suppose we have string variable Y, and we would like to replace variable X when variable Y contains certain characters such as "Dec". In other words, we want to write; replace X="m12" if Y (contains "Dec") replace X="m11" if Y (contains "Nov") replace X="m10" if ...
// if you need to create any intermediate results: tempvar tmp1 tmp2 . . . gen double 'tmp1 ' = . . . ... quietly replace 'lnfj' = . . . end where 'todo' 'b' 'lnfj' always contains 0 (may be ignored) full parameter row vector b=(b1,b2,...,bE ) variable to be ...
To<statalist@hsphsun2.harvard.edu> Subjectst: replace and strpos DateWed, 15 Aug 2012 10:12:17 +0100 Follow-Ups: Re: st: replace and strpos From:Daniel Feenberg <feenberg@nber.org> Re: st: replace and strpos From:Nick Cox <njcoxstata@gmail.com>...