Statalist


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

st: RE: rowlast for string variables


From   "Joseph Coveney" <[email protected]>
To   <[email protected]>
Subject   st: RE: rowlast for string variables
Date   Sat, 29 Aug 2009 17:50:52 +0900

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/



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