Hi,
I have a file of all metro areas in the US and I want to create a new dataset with just the top 100 metro areas (in terms of population). Is there an 'easier' way to do this via syntax? The total pop ranges from 23869 - 4140718. Thanks! -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
sort cases by population (d). n of cases 100. *where "population" is the name of the population variable. On Thu, Jun 7, 2018 at 9:31 AM, Greg <[hidden email]> wrote: Hi, |
Thank you for the quick reply, however the syntax is not working.
-- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
Could you be more specific? What is the syntax you are using? Is there an error message? What does "not working" mean? On Thu, Jun 7, 2018 at 9:57 AM, Greg <[hidden email]> wrote: Thank you for the quick reply, however the syntax is not working. |
Sure, even though I'm positive I'm doing something wrong. Also, wrong choice
of word ('not working') - it's producing an error message. I used the same syntax you gave and got the following error message: Error # 4213 in column 12. Text: ( The N OF CASES command can only accept a positive integer or the keyword UNKNOWN. Execution of this command stops. execute. Thanks! -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 Greg
n of cases command waits for some subsequent commend in order to
work.
07.06.2018 17:57, Greg пишет:
Thank you for the quick reply, however the syntax is not working. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 ===================== 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 Greg
n of cases 100. is a valid command. The error message suggests that you did not enter a positive integer for the number of cases. And as noted by Kirill, the command won't take effect until some command reads the data, such as execute. On Thu, Jun 7, 2018 at 10:04 AM, Greg <[hidden email]> wrote: Sure, even though I'm positive I'm doing something wrong. Also, wrong choice |
Rick, actually N OF CASES takes effect immediately. It, however,
won't show up in the data editor.
N OF CASES 10. COMPUTE x= 2. EXEC. Compute will really be performed on hte first 10 cases only. But you won't see it until EXEC or other command running tranforms follows. 07.06.2018 18:32, Rick Oliver пишет:
===================== 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 |
Thanks, Kirill. I thought it took place immediately, but I wasn't seeing the effect in the Data Editor. On Thu, Jun 7, 2018 at 10:48 AM, Kirill Orlov <[hidden email]> wrote:
|
In reply to this post by Rick Oliver
Note that the n of cases command syntax is not as...forgiving...as most other commands. For example: n of cases=100. will generate the error you reported. The only correct form is: n of case [integer]. The story goes that it was originally intended for internal testing only, but it was accidentally included in the end-user documentation. But that was before my time at SPSS, which means before 1989, On Thu, Jun 7, 2018 at 10:32 AM, Rick Oliver <[hidden email]> wrote:
|
N of cases is weird syntax with or without =. On Thu, Jun 7, 2018 at 1:13 PM Rick Oliver <[hidden email]> wrote:
-- |
Free forum by Nabble | Edit this page |