Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: matrix - how to copy row names into data?


From   "Ada Ma" <heu034@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: matrix - how to copy row names into data?
Date   Mon, 9 Jul 2007 21:15:52 +0100

Hi Statalist,

I have a matrix:
    A1
A1  x
B2  x
C3  x


The x's are the numbers, I can svmat them into data without any
problem, but I want to copy the names of the rows (A1, B2, C3) into
the data as well (so that I can export the rownames as well as the
numbers into a CSV file).  How do I do that?

I know I can store the rownames into a local and then stick the
rownames into the data one by one, but I think there must be faster
neater ways to do that.  All suggestions welcomed!

Thanks in advance!
Ada
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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