LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 13 Jun 2007 21:36:50 -0400
Reply-To:   Ken Chui <kenneth.chui@GMAIL.COM>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Ken Chui <kenneth.chui@GMAIL.COM>
Subject:   Re: How can I automatically display the variable label as title in spss syntax

Hello, you may change it into a small macro:

* Define the macro name as "vartitle" with a token as "inlist". DEFINE !vartitle (inlist = !ENCLOSE("(",")")). !DO !I !IN (!inlist). TABLES /FORMAT BLANK MISSING('.') /TABLES !I BY (STATISTICS) /TITLE !QUOTE(!I) . !DOEND . !ENDDEFINE .

* Evoke the macro with the variable of your choice. !vartitle inlist = (income). EXE .

<><><><><> If you have multiple varialbe, just expand the "inlist", e.g. !vartitle inlist = (income gender education ethnicity). EXE.

Then you should be able to get the tables.

Hope this helps.

Ken

On Wed, 13 Jun 2007 02:57:20 -0400, Kevin Wong <flutter8888@YAHOO.COM.CN> wrote:

>Hello,everybody: > I always use the spss syntax to create a lot of tables in my work,but I >am worried about a problem about the titles of the tables.For example: > * Basic Tables. >TABLES > /FORMAT BLANK MISSING('.') > /TABLES income > BY (STATISTICS) > /TITLE 'income'. > >Only the constant character string can be specified in the title >subcommand ,but I hope to automatically display the variable label as >title in spss syntax ,such as: > > * Basic Tables. >TABLES > /FORMAT BLANK MISSING('.') > /TABLES income > BY (STATISTICS) > /TITLE var label. > >When executed,a warning occurs. > >So can you fix this issue in some way? >Help me!


Back to: Top of message | Previous page | Main SPSSX-L page