I think I answered the question for myself but want to know if you see
some problems or possibilities to improve with that syntax. The following code is derived by myself from code generated with a gui-clicking orgie. COMPUTE filter_$=(v46c = 5). FILTER BY filter_$. EXECUTE. FREQUENCIES VARIABLES=v46s /ORDER=ANALYSIS. FILTER OFF. USE ALL. EXECUTE. DELETE VARIABLE filter_$. As I see there is no way to FILTER without creating a new variable inside my beautiful and clean dataset? :D Is there a special meaning of the $ at the end of the variable? ===================== 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 |
Make use of the TEMPORARY command: temp. select if (v46c = 5).
freq v46s. |
In reply to this post by Moon Kid
Yes I do not think there is any way around creating a new variable for the FILTER. Also see MATCH FILES and the DROP subcommand to get rid of variables in addition to DELETE VARIABLE.
FILTER is better if you are generating multiple tables, but if you only need to create one frequency table you could use TEMPORARY and SELECT IF. Example below. TEMPORARY. SELECT IF (v46c = 5). FREQUENCIES VARIABLES=v46s /ORDER=ANALYSIS. And that would accomplish the same thing as your listed code (you also do not need the USE ALL command). But this only works for one table at a time - as the TEMPORARY command only works for one pass of the data. |
In reply to this post by Moon Kid
You can simplify this by using
temporary. select if ... frequencies ... Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Moon Kid <[hidden email]> To: [hidden email], Date: 04/01/2014 05:07 AM Subject: [SPSSX-L] selective analysis Sent by: "SPSSX(r) Discussion" <[hidden email]> I think I answered the question for myself but want to know if you see some problems or possibilities to improve with that syntax. The following code is derived by myself from code generated with a gui-clicking orgie. COMPUTE filter_$=(v46c = 5). FILTER BY filter_$. EXECUTE. FREQUENCIES VARIABLES=v46s /ORDER=ANALYSIS. FILTER OFF. USE ALL. EXECUTE. DELETE VARIABLE filter_$. As I see there is no way to FILTER without creating a new variable inside my beautiful and clean dataset? :D Is there a special meaning of the $ at the end of the variable? ===================== 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 |
In reply to this post by Moon Kid
You might also want to
consider SPLIT FILE CROSSTABS some other ways of looking at
the 2 or more ways of breaking out data.
Art Kendall Social Research ConsultantsOn 4/1/2014 7:14 AM, Moon Kid [via SPSSX Discussion] wrote: I think I answered the question for myself but want to know if you see
Art Kendall
Social Research Consultants |
Free forum by Nabble | Edit this page |