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: Load data using macro


From   Rebecca Pope <[email protected]>
To   [email protected]
Subject   Re: st: Load data using macro
Date   Thu, 13 Jun 2013 09:14:29 -0500

Did you try compound quotation marks?

use `"`depvar'"'

Regards,
Rebecca

On Thu, Jun 13, 2013 at 8:57 AM, G. Anderson <[email protected]> wrote:
> Hi,
>
> I am able to save files using the name of a variable in a macro (in this
> case my dependent variable
>
> So when I type
>
> save `depvar', replace
>
> it saves a file with the name of the dependent variable as my filename.
>
> Unfortunately when loading data
>
> use `depvar'
> doesn't work. Any ideas how you can load data using names defined by macros?
>
>
> Thanks
>
> Gareth
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index