does not work I just get missing values. Presumably that is because mydate variable is not in the order: day - month - year, but rather year -month - day.I then thought I would redo the variable into a correct order and firsttried to create 3 separate string variables out of each da...
To statalist@hsphsun2.harvard.edu Subject Re: st: How to apply a command to numeric variables only Date Wed, 30 May 2012 09:00:28 +0100Note that you had > . foreach var of varlist srhcareactivity1-srhcareactivity6{ > 2. capture decode `var', generate(str) > 3. if _rc == ...
So my next solution is to overwrite the route-Helper-Function of laravel and always give in a default lang-param. I did it this way: Create a file: /app/Http/helpers.php with this content: <?php /** * Generate a URL to a named route. * * @param string $name * @par...
So let's suppose you just want >> a string version. >> >> foreach var in `r(varlist)' { >> capture decode `var', generate(work) >> if _rc gen work = string(`var') >> drop `var' >> rename work `var' >> } >> * * For searches and help try: * http://www.stata....
> > I have tried using capture to ignore the error. > > How can I restrict the command to numeric variables only? > > By the way, is there a way to keep the variable label which is lost when I use generate. > * * For searches and help try: * http://www.stata.com/help.cgi...
Dear statalists, I have a string variable X as follows: X Y aabb 2 bbdd 0 cdba 1 dxbaa 2 dxaa 2 I want to generate a variable Y to stand for the number of certain characters, such as "aa" and replace these characters with other characters, such as "zz". How to do it ? Th...
to prevent that (seehttp://www.ats.ucla.edu/stat/stata/faq/longid.htm). Here I construct the string variable -newid-; for the first observation in the sample data it becomes "206141-450": generate sa1=string(a1,"%03.0f") generate sa3=string(a3,"%6.0f") ...
I then thought I would redo the variable into a correct order andfirst tried to create 3 separate string variables out of each date:one for year, one for month and one for day. I tried to do it as follows: generate strbirth_date= string(date_of_birth, "%08.0f") ...
To: "statalist" <statalist@hsphsun2.harvard.edu> Sent: Thursday, October 13, 2005 9:32 AM Subject: Re: st: How to cope with string when transfrom from Epidata to Stata Additionally, when I run - . destring v1, generate(vv1) float ...
>>> >>> By the way, is there a way to keep the variable label which is lost when >>> I use generate. >>> >>> >>> * >>> * For searches and help try: >>> * http://www.stata.com/help.cgi?search >>> * http://www.stata.com/support/statalist/faq >>> * http://www...