Statalist


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

st: Re: pass quotes in a local macro


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: pass quotes in a local macro
Date   Sat, 27 Jun 2009 00:26:00 +0200

"how can I pass the valuelabels for the different cateogires of var"?

Use extended macro functions:

***
sysuse auto.dta
di "`:label(foreign) 0'"
di "`:label(foreign) 1'"
***

HTH
Martin
_______________
----- Original Message ----- From: "moleps islon" <moleps2@gmail.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Saturday, June 27, 2009 12:18 AM
Subject: st: pass quotes in a local macro


Dear listers,
I´m trying to expand a local string for every category of another
variable and generate custom tickmarks and labeling on a graph. The
problem is that I do not understand how to pass quotes in a macro for
-xlabel- to understand it.

foreach var in `w'{

local zar=(`za'+(o+1)*(`gt'))
local xt `xt' `zar' ----here I´d like to pass -quote-`var' quote..
however I cannot figure out how to do this without getting error
messages.

local ++gt
}


tw `q', xtitle(`3') xlabel(`xt´) ytitle(`1') name(`1',replace)
legend(subtitle(`2')) legend(`z')


also -how can I pass the valuelabels for the different cateogires of var- ??


Regards,

M

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


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index