code to get old "display labels" output?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

code to get old "display labels" output?

Nils-Eivind Naas
I have some users of SPSS 15 who are despairing over the new look of the
"Display labels" or "Display variables" output.

Is there a macro or Python code to produce the "old" output?

--
Nils-Eivind Naas
Institute for Social Research
Oslo
Reply | Threaded
Open this post in threaded view
|

Re: code to get old "display labels" output?

Peck, Jon
Take a look at the DisplayDict Python module on SPSS Developer Central (www.spss.com/devcentral),  It includes a display more like the old one in SPSS and integrates optional codebook-style statistics in the output.

HTH,
Jon Peck



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Nils-Eivind Naas
Sent: Tuesday, September 11, 2007 4:43 AM
To: [hidden email]
Subject: [SPSSX-L] code to get old "display labels" output?

I have some users of SPSS 15 who are despairing over the new look of the
"Display labels" or "Display variables" output.

Is there a macro or Python code to produce the "old" output?

--
Nils-Eivind Naas
Institute for Social Research
Oslo
Reply | Threaded
Open this post in threaded view
|

Question about shortening values within a variable

stace swayne
In reply to this post by Nils-Eivind Naas
Dear list,

  I have a variable with student ID numbers such as (16447416) and I would like to shorten the ID numbers by one number such as (1644741).

  Does anyone have a suggestion on the syntax for doing this?

  All advice is appreciated,

  Stace




---------------------------------
Shape Yahoo! in your own image.  Join our Network Research Panel today!
Reply | Threaded
Open this post in threaded view
|

Re: Question about shortening values within a variable

Melissa Ives
If it is numeric...

        Compute newid=trunc(oldid/10).


Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
stace swayne
Sent: Tuesday, September 11, 2007 9:04 AM
To: [hidden email]
Subject: [SPSSX-L] Question about shortening values within a variable

Dear list,

  I have a variable with student ID numbers such as (16447416) and I
would like to shorten the ID numbers by one number such as (1644741).

  Does anyone have a suggestion on the syntax for doing this?

  All advice is appreciated,

  Stace




---------------------------------
Shape Yahoo! in your own image.  Join our Network Research Panel today!


PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.
Reply | Threaded
Open this post in threaded view
|

Re: Question about shortening values within a variable

Albert-Jan Roskam
Or if it's a string var, you could use:
numeric newid (n6.0)
compute newid = trunc(number (rtrim(oldid),n6.0) /10).

or:
string newid (a8).
compute newid = substr(oldid,1,7).
(this assumes that the number of digits per ID is
always 8.

Cheers!!
Albert-Jan


--- Melissa Ives <[hidden email]> wrote:

> If it is numeric...
>
>         Compute newid=trunc(oldid/10).
>
>
> Melissa
>
> -----Original Message-----
> From: SPSSX(r) Discussion
> [mailto:[hidden email]] On Behalf Of
> stace swayne
> Sent: Tuesday, September 11, 2007 9:04 AM
> To: [hidden email]
> Subject: [SPSSX-L] Question about shortening values
> within a variable
>
> Dear list,
>
>   I have a variable with student ID numbers such as
> (16447416) and I
> would like to shorten the ID numbers by one number
> such as (1644741).
>
>   Does anyone have a suggestion on the syntax for
> doing this?
>
>   All advice is appreciated,
>
>   Stace
>
>
>
>
> ---------------------------------
> Shape Yahoo! in your own image.  Join our Network
> Research Panel today!
>
>
> PRIVILEGED AND CONFIDENTIAL INFORMATION
> This transmittal and any attachments may contain
> PRIVILEGED AND
> CONFIDENTIAL information and is intended only for
> the use of the
> addressee. If you are not the designated recipient,
> or an employee
> or agent authorized to deliver such transmittals to
> the designated
> recipient, you are hereby notified that any
> dissemination,
> copying or publication of this transmittal is
> strictly prohibited. If
> you have received this transmittal in error, please
> notify us
> immediately by replying to the sender and delete
> this copy from your
> system. You may also call us at (309) 827-6026 for
> assistance.
>


Cheers!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Did you know that 87.166253% of all statistics claim a precision of results that is not justified by the method employed? [HELMUT RICHTER]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
Reply | Threaded
Open this post in threaded view
|

Re: code to get old "display labels" output?

Richard Ristow
In reply to this post by Nils-Eivind Naas
At 05:42 AM 9/11/2007, Nils-Eivind Naas wrote:

>I have some users of SPSS 15 who are despairing over the new look of
>the
>"Display labels" or "Display variables" output.

Fortunately, this has come up before; see thread "Oh, dear. They
improved DISPLAY LABELS.", Thu, 2 Feb 2006 <17:31:51 -0500> ff.

Two solutions were posted; I believe they both work.

Using OMS:

>Date:    Fri, 3 Feb 2006 21:40:55 +1100
>From:    Jason Burke <[hidden email]>
>Subject: Re: Oh, dear. They improved DISPLAY LABELS.
>To:      [hidden email]
>
>Try the output management system (OMS), here I pipe the display labels
>output to a text file...:
>
>OMS
>  /SELECT TABLES
>  /IF LABELS = 'Variable Labels'
>  /DESTINATION FORMAT = TEXT
>         OUTFILE = "C:\Temp\DisplayLabels.txt" .
>
>DISPLAY LABELS .
>
>OMSEND .

Using Python:

>Date:    Fri, 3 Feb 2006 07:39:10 -0600
>From:    "Peck, Jon" <[hidden email]>
>Subject: Re: Oh, dear. They improved DISPLAY LABELS.
>To:      [hidden email]
>
>Ok, Ok.  Put this code somewhere convenient and run it whenever you
>feel the urge.
>
>BEGIN PROGRAM.
>import spss, spssaux
>vardict = spssaux.VariableDict()
>for v in vardict:
>         print v.VariableName, v, v.VariableLabel
>END PROGRAM.
Reply | Threaded
Open this post in threaded view
|

Re: Question about shortening values within a variable

Fry, Jonathan B.
In reply to this post by stace swayne
compute shortid = trunc(id/10).
format shortid (f7).

Jonathan Fry
SPSS Inc.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of stace swayne
Sent: Tuesday, September 11, 2007 9:04 AM
To: [hidden email]
Subject: Question about shortening values within a variable

Dear list,

  I have a variable with student ID numbers such as (16447416) and I would like to shorten the ID numbers by one number such as (1644741).

  Does anyone have a suggestion on the syntax for doing this?

  All advice is appreciated,

  Stace




---------------------------------
Shape Yahoo! in your own image.  Join our Network Research Panel today!