Date: Wed, 20 Sep 2006 13:40:36 -0500
Reply-To: Melissa Ives <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Melissa Ives <email@example.com>
Subject: Re: Moving varaibles using syntax
Content-Type: text/plain; charset="us-ascii"
I am assuming that by 'row #' you mean the row in the Variable View. I
am also assuming that by requesting this in syntax, simply dragging the
variable over to where you want it is not the solution you prefer.
The way we usually reorder variables is with a save command that
'overwrites' the current dataset, then re-open it.
SAVE OUTFILE='C:\myfile.sav'/keep=var1 to var14 var16 to var35 var15
var36 to varn.
You can drop in the list of variables using the variables icon if that
is easier. You can also specify exactly the order of each individual
variable or use the 'to' command to include multiple vars at once.
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Wednesday, September 20, 2006 10:30 AM
Subject: Re: [SPSSX-L] Moving varaibles using syntax
Still struggling to try find a solution to the exact problem...
How does one move a variable which is in row 15 initially to row 36??
On 20/09/06, ariel barak <firstname.lastname@example.org> wrote:
> I found how to do this myself two days ago after finding the topic
> covered on Raynald's SPSS Tools site. Here is the syntax below...
> * How to delete or reorder variable names.
* Raynald Levesque
DATA LIST LIST /id sex var1 z age.
1 1 1 1 25
2 2 2
> 2 35
3 1 5 0 65
* TO change the order to the variables to age id
> sex var1 z.
MATCH FILES FILE=* /KEEP=age ALL.
* NOTE: In the above
> command, ALL means all remaining variables not previously named.
* Use the
> following to delete variables var1, z and age.
MATCH FILES FILE=* /DROP=var1
> z age.
> On 9/20/06, Jignesh Sutar <email@example.com > wrote:
> > Hello,
> > Is it possible to move variable position using syntax? Using SPSS
> > v15
> > Thanks in advance
> > Jignesh
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.