Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: AW: create a dataset or vector of variable names


From   "Sheena Sullivan" <[email protected]>
To   <[email protected]>
Subject   Re: st: AW: create a dataset or vector of variable names
Date   Thu, 25 Feb 2010 09:40:32 -0800

Thanks very much for that.  To sum, I did the following 


use mydata, clear
ssc inst descsave
descsave, sa(varname)  keep(name)
use varname
li

forval i = 1/109 { 			
	local names `names' `=name[`i']' 
}
matrix colnames R = `names' 
clear
svmat mymat, names( col )


which gave me a dataset from my matrix with the appropriate variables names.
Thanks again,
Sheena 

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index