|
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 |
|
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
|
|
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 |
|
|
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
|
|
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
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 |
| Free forum by Nabble | Edit this page |
