Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: rowlast for string variables


From   Andrzej Niemierko <[email protected]>
To   Stata <[email protected]>
Subject   Re: st: RE: rowlast for string variables
Date   Sat, 29 Aug 2009 09:51:49 -0400

Thank you very much Joseph! Indeed, it does work. Somehow I forgot to
include type (str) in the command line.

P.S. Unfortunately, the Partners Compliance note is automatically attached
to every email I sent from my Partners account to non-Partners addresses.



On 8/29/09 4:50 AM, "Joseph Coveney" <[email protected]> wrote:

> Andrzej Niemierko wrote:
> 
> Is there an equivalent of egen function "rowlast(varlist)" for string
> variables?
> 
> ------------------------------------------------------------------------------
> --
> 
> -egen . . .,  rowlast(. . .)- works with string variables for me.  What
> problem
> are you having?
> 
> Joseph Coveney
> 
> . clear *
> 
> . set obs 2
> obs was 0, now 2
> 
> . generate str a = "A"
> 
> . generate str b = "B"
> 
> . replace a = "" in 1
> (1 real change made)
> 
> . replace b = "" in 2
> (1 real change made)
> 
> . egen str rowlast_for_string = rowlast(a b)
> 
> . list, noobs
> 
>   +------------------+
>   | a   b   rowlas~g |
>   |------------------|
>   |     B          B |
>   | A              A |
>   +------------------+
> 
> P.S.  It seems curious that Partners Compliance would ever send an e-mail
> message containing patient information via the Internet.
> 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/



The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index