Statalist The Stata Listserver


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

st: Re: variable names from another dataset


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: variable names from another dataset
Date   Fri, 30 Mar 2007 14:10:00 -0400

Sure-

de using otherfile, varlist
local othervars "`r(varlist)'"

Michael Blasnik

----- Original Message ----- From: "David Kantor" <[email protected]>
To: "Statalist" <[email protected]>
Sent: Friday, March 30, 2007 1:51 PM
Subject: st: variable names from another dataset



Does anyone know, is it possible to get the variable names of another dataset without loading it?

Presently, I do this...
use otherfile
unab othervars : *

use mymainfile
[ code referencing othervars ]
...

But can I avoid -use-ing otherfile?
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index