Help=?ISO-8859-1?Q?=EF=BC=81let?= Custom Tables create the output rows with the same order as the multiple response set

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

Help=?ISO-8859-1?Q?=EF=BC=81let?= Custom Tables create the output rows with the same order as the multiple response set

Chris-786
Hi Friends,
Please help me figure out how to tackle this:

A multiple response set named [$Q1] has more then 10 variables, namely
Q1_1, Q1_2...Q1_14,
I use this set in Custom Tables to create  freq. result.
But the order of output rows seems to be  sorted alphabetically as Q1_1,
Q1_10, Q1_11, Q1_12,Q1_13, Q1_14,Q2,Q3,...
I want them to be the same ascending order that I prepare the set and don't
want to change original names to
Q1_01,Q1_02,......Q1_14.  Could you help solve this?  Thanks.


Regards
Chris

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Help!let Custom Tables create the output rows with the same order as the multiple response set

John F Hall
Without seing your syntax or output, this is just a guess. I know you don't want to change your variable names, but I think you're going to have to.  If your source variables are adjacent and in sequence in the file try (from memory) .  If say they are in the range 1 thru 6:
 
rename variables q1_1 to q1_14 = a1 to a14.
mult response groups = $q1 (a1 to a14 (1,6)
    /freq $q1.
 
You'll need value labels for the first variable in the list viz a1
----- Original Message -----
Sent: Thursday, February 04, 2010 4:50 AM
Subject: Help!let Custom Tables create the output rows with the same order as the multiple response set


Hi Friends,
Please help me figure out how to tackle this:

A multiple response set named [$Q1] has more then 10 variables, namely
Q1_1, Q1_2...Q1_14,
I use this set in Custom Tables to create  freq. result.
But the order of output rows seems to be  sorted alphabetically as Q1_1,
Q1_10, Q1_11, Q1_12,Q1_13, Q1_14,Q2,Q3,...
I want them to be the same ascending order that I prepare the set and don't
want to change original names to
Q1_01,Q1_02,......Q1_14.  Could you help solve this?  Thanks.


Regards
Chris

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

A New Extension Command on Developer Central

Jon K Peck
In reply to this post by Chris-786

I have posted a new extension command, SPSSINC PROGRAM, that allows Python programs to be run with traditional syntax without the author having created an extension command.  You can get it from SPSS Developer Central (www.spss.com/devcentral).  It works with Version 17 or later.

The package, which includes a dialog box for this command, makes it very easy to write BEGIN PROGRAM Python programs that can take parameters written in traditional style.

I have also written about this on my blog at insideout.spss.com.

I hope you find this useful.

Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435

Reply | Threaded
Open this post in threaded view
|

Re: A New Extension Command on Developer Central

Albert-Jan Roskam
hi Jon,

Neat program. I just tried it and it works like a breeze. How can I change the extensions directory? It would be nice to have one central repository (UNC location) of custom commands, which can be accessed by all colleagues. That would be really handy in my company, where support/R&D ('real' programming) and research (spss syntax) are separated.

Thank you,
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the face of ambiguity, refuse the temptation to guess.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- On Thu, 2/4/10, Jon K Peck <[hidden email]> wrote:

From: Jon K Peck <[hidden email]>
Subject: [SPSSX-L] A New Extension Command on Developer Central
To: [hidden email]
Date: Thursday, February 4, 2010, 7:56 PM


I have posted a new extension command, SPSSINC PROGRAM, that allows Python programs to be run with traditional syntax without the author having created an extension command.  You can get it from SPSS Developer Central (www.spss.com/devcentral).  It works with Version 17 or later.

The package, which includes a dialog box for this command, makes it very easy to write BEGIN PROGRAM Python programs that can take parameters written in traditional style.

I have also written about this on my blog at insideout.spss.com.

I hope you find this useful.

Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435


Reply | Threaded
Open this post in threaded view
|

Re: A New Extension Command on Developer Central

Jon K Peck

You can create an environment variable named SPSS_EXTENSIONS_PATH with a list of semi-colon separated directories, like the PATH variable.  SPSS will look in those places first and finally in the default extensions subdirectory.  That will work for the xml files.  In V18 that path is automatically added to the Python search path as well, but I don't remember that happens in V17.  If it doesn't, you can create a file
sitecustomize.py in your site-packages directory to add these locations to your Python search path.

My sitecustomize file has entries like
import sys
sys.path.append("c:/extcommon")



Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



From: Albert-Jan Roskam <[hidden email]>
To: [hidden email], Jon K Peck/Chicago/IBM@IBMUS
Date: 02/04/2010 01:48 PM
Subject: Re: [SPSSX-L] A New Extension Command on Developer Central





hi Jon,

Neat program. I just tried it and it works like a breeze. How can I change the extensions directory? It would be nice to have one central repository (UNC location) of custom commands, which can be accessed by all colleagues. That would be really handy in my company, where support/R&D ('real' programming) and research (spss syntax) are separated.

Thank you,
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the face of ambiguity, refuse the temptation to guess.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- On Thu, 2/4/10, Jon K Peck <[hidden email]> wrote:


From: Jon K Peck <[hidden email]>
Subject: [SPSSX-L] A New Extension Command on Developer Central
To: [hidden email]
Date: Thursday, February 4, 2010, 7:56 PM


I have posted a new extension command, SPSSINC PROGRAM, that allows Python programs to be run with traditional syntax without the author having created an extension command.  You can get it from SPSS Developer Central (
www.spss.com/devcentral).  It works with Version 17 or later.

The package, which includes a dialog box for this command, makes it very easy to write BEGIN PROGRAM Python programs that can take parameters written in traditional style.

I have also written about this on my blog at insideout.spss.com.

I hope you find this useful.

Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



Reply | Threaded
Open this post in threaded view
|

Re: [SPSSX-L] Help!let Custom Tables create the output rows with the same order as the multiple response set

Jon K Peck
In reply to this post by Chris-786

You can specify the order of the variables explicitly in CTABLES via either the dialog box or syntax.

If you have, say, a mult response set named $eleven, use this CATEGORIES subcommand to set the order.

  /CATEGORIES VARIABLES=$eleven [q1_1, q1_2, q1_3, q1_4, q1_5, q1_6, q1_7, q1_8, q1_9, q1_10,
    q1_11] EMPTY=INCLUDE

Even easier, select $eleven and in the Categories subdialog, choose to sort by set order.
  /CATEGORIES VARIABLES=$eleven  EMPTY=INCLUDE.
should do it.

You can also choose to sort by the label.

HTH,
Jon Peck


Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



From: Chris <[hidden email]>
To: [hidden email]
Date: 02/04/2010 07:47 AM
Subject: [SPSSX-L] Help!let Custom Tables create              the output              rows with the same order as the multiple response set
Sent by: "SPSSX(r) Discussion" <[hidden email]>





Hi Friends,
Please help me figure out how to tackle this:

A multiple response set named [$Q1] has more then 10 variables, namely
Q1_1, Q1_2...Q1_14,
I use this set in Custom Tables to create  freq. result.
But the order of output rows seems to be  sorted alphabetically as Q1_1,
Q1_10, Q1_11, Q1_12,Q1_13, Q1_14,Q2,Q3,...
I want them to be the same ascending order that I prepare the set and don't
want to change original names to
Q1_01,Q1_02,......Q1_14.  Could you help solve this?  Thanks.


Regards
Chris

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD