Statalist The Stata Listserver


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

Re: st: variable names from another dataset


From   Gary Longton <glongton@fhcrc.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: variable names from another dataset
Date   Fri, 30 Mar 2007 11:06:12 -0700

David Kantor wrote:
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?
describe using <otherfile>, varlist
local otherfilevars = "`r(varlist)'"

- GL


*
*   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