number in first character of variable

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

number in first character of variable

Ben Cohen
Hello:

I am using Remark software, which writes a NUMBER to the beginning of some
variable names automatically. When I read the Remark datasets into SPSS, I
run into trouble b/c SPSS won't transform or read these variables.

RENAME VARIABLES and COMPUTE (e.g. COMPUTE newvar=#oldvar) won't help.

Does anyone know a method to transform variables that have numbers in the
first character?

Thanks!

=====================
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: number in first character of variable

Art Kendall
how are you bringing the data into SPSS?

What kinds of messages are you getting?

Art Kendall
Social Research Consultants

Ben wrote:

> Hello:
>
> I am using Remark software, which writes a NUMBER to the beginning of some
> variable names automatically. When I read the Remark datasets into SPSS, I
> run into trouble b/c SPSS won't transform or read these variables.
>
> RENAME VARIABLES and COMPUTE (e.g. COMPUTE newvar=#oldvar) won't help.
>
> Does anyone know a method to transform variables that have numbers in the
> first character?
>
> Thanks!
>
> =====================
> 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: number in first character of variable

Art Kendall-2
SPSS names have always had to start with a letter of a few special characters (@ # $) .  I suggest that you contact Gravic so that you can get them to support you.
It is very odd that a package  says it exports to SPSS and starts variable names with numbers.   They must have other SPSS users among their customers.

If they do not help you. you might repost and ask explicitly whether there is a python approach to renaming such variables.
I was unable to manually input variable names into the variable view that started with a number.


 Art

Ben Cohen wrote:
Art:

Thanks for writing. The data save from Remark directly into an SPSS
format. I then open the SPSS file either through syntax or using the
menus.  I can change the variable names manually (by clicking on them in
the variable view) but can change the names with syntax commands.

Here's one message:

GET
FILE='\\S-drive\home\Research_and_Evaluation_Group\SCOPE\data\0809\SCOPE
_Spring_Survey_2009.sav'.
rename variables 466sec=sec467.

  
Error # 5219 in column 18.  Text: 466
Invalid symbol in the RENAME new variable list.  SPSS encountered
    
something
  
other than a variable name or the TO keyword.
This command not executed.
    


  
Error # 5215 in column 21.  Text: sec
An undefined variable was named in the RENAME old variable list.
    

exe.

-----Original Message-----
From: Art Kendall [[hidden email]]
Sent: Thursday, March 26, 2009 1:16 PM
To: Ben Cohen
Cc: [hidden email]
Subject: Re: number in first character of variable

how are you bringing the data into SPSS?

What kinds of messages are you getting?

Art Kendall
Social Research Consultants

Ben wrote:
  
Hello:

I am using Remark software, which writes a NUMBER to the beginning of
    
some
  
variable names automatically. When I read the Remark datasets into
    
SPSS, I
  
run into trouble b/c SPSS won't transform or read these variables.

RENAME VARIABLES and COMPUTE (e.g. COMPUTE newvar=#oldvar) won't help.

Does anyone know a method to transform variables that have numbers in
    
the
  
first character?

Thanks!

=====================
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